Yesterday, I was trying a problem. I got two different verdict on the apporx same code.
Solution 1 (Accepted) : https://mirror.codeforces.com/contest/271/submission/115150455
Solution 2 (Runtime Error) : https://mirror.codeforces.com/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://mirror.codeforces.com/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!