Typedef Vs #define c++

Revision en1, by 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://mirror.codeforces.com/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??

Tags macros, judgmental bugs, preprocessor

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English VasuOberoi 2021-06-26 18:44:36 554 Initial revision (published)