Блог пользователя hackerbhaiya

Автор hackerbhaiya, история, 4 года назад, По-английски

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!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -2
  • Проголосовать: не нравится