Weird behavior C++

Revision en1, by osama, 2015-07-19 00:58:59

Recently I've tried to solve this problem 160D - Edges in MST but there was a bug in my code, I've tried to debug the code but that was just wasting time, then I've rewritten the code again and got AC :D. Making a comparison between the two codes was so weird they were almost identical, I read about undefined - behavior in C++ but I couldn't find anything like that.

WA code: 12013993

AC code: 12013990

Any help would be appreciated.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English osama 2015-07-19 00:58:59 490 Initial revision (published)