Strange Verdict

Revision en1, by hackerbhaiya, 2021-05-05 21:46:23

Yesterday, I was trying a problem. I got two different verdict on the apporx same code.
Solution 1 (Accepted) : https://codeforces.me/contest/271/submission/115150455
Solution 2 (Runtime Error) : https://codeforces.me/contest/271/submission/115150580

See line 83 of solution 1. There i have assigned pre[1][2] to some value which is out of bound. But still the code was accepted, it should give Runtime Error as given in the solution 2. In solution 2, I changed long long to int. I submitted another code in which i removed pre[1][2] assignment and then it was accepted.
Solution 3 : https://codeforces.me/contest/271/submission/115150618

Someone please tell why didn't I get RTE in my solution 1 as pre[1][2] is clearly out of bound?
Thanks in advance!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hackerbhaiya 2021-05-05 21:46:23 1044 Initial revision (published)