Strange C++ behavior

Revision en1, by AnasAbbas, 2016-09-15 04:26:47

i had runtime error in this submission and i was going crazy finding where the error is

after 2 hours of debugging and tracing .. i didn't find the problem .. i did something stupid and the problem got accepted .. i don't know why actually ...

does any one knows where was the error in the first code ? ?

and why C++ behaves like that

run time error : http://codeforces.net/contest/706/submission/20629423

accepted :http://codeforces.net/contest/706/submission/20629645

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English AnasAbbas 2016-09-15 04:26:47 507 Initial revision (published)