Typedef Vs #define c++

Правка en1, от VasuOberoi, 2021-06-26 18:44:36

PLease explain why 2 same codes are not giving the same ans

code forces round 728 div2 Problem B :https://codeforces.net/contest/1541/problem/B

AC Submission : https://ide.codingblocks.com/s/579800

Wrong output Submission :https://ide.codingblocks.com/s/579801

Difference is using of macro (node) instead of pair<int,int>

Please help

If i am using #define node pair<int,int> it is getting accepted but when i am using typedef pair<int,int> node; it is giving wrong answer

Why this is happening ?? Is it a bug??

Теги macros, judgmental bugs, preprocessor

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский VasuOberoi 2021-06-26 18:44:36 554 Initial revision (published)