Jelefy's blog

By Jelefy, history, 2 months ago, In English

Hi guys,

The context is, in problem H of the just finished APAC Championship (https://mirror.codeforces.com/contest/2206/problem/H), our first code did not deal with the case where there are equal ai's, and it got Wrong Answer in the contest. However, when I tested on Codeforces, it got Runtime Error verdict on the 3rd test case, which is just the next test case other than the 2 examples given.

So, is it possible that mod 0 on Domjudge will return WA? This was one of the major reasons that caused us not to qualify to WF, we wasted ~30 mins because of the WA verdict and thought that our solution was wrong.

Thanks.

  • Vote: I like it
  • +8
  • Vote: I do not like it

»
2 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Jelefy (previous revision, new revision, compare).

»
2 months ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Mod 0 is equal to a division by 0 and it is undefined behavior. Runtime error on Codeforces is caused by diagnostics that Domjudge does not have (actually, i am not sure that diagnostics are throwing RE, but the main rule that with UB, you won't know if it will give you WA or RE or something else).