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.








Auto comment: topic has been updated by Jelefy (previous revision, new revision, compare).
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).
got it! Thank you so much