I have a complain. I have solve Question B & C of Codeforces Round 931 & it was succesfully run in pretests, but after the contest it's showing runtime error. & submitting the same code after the contest it is succesfully accepted. Please tell me how it's happened. harsh__h
C: During Contest & after contest
B: During Contest & after contest
[Later Edited]: I have got the problem that it's due to vector size declaration of 30, but i am confused why it didn't give runtime error on test 1 instead of this later cases.
Auto comment: topic has been updated by Adonis_ (previous revision, new revision, compare).
You're right, both solutions are exactly the same character by character.
It could be because of an array out of bound, but I think CodeForces usually use
-fsanitize=address
to give a meaningful error, not just a random exit code.Alse, it can be because of Operating System error that occurred during contest which can't be controlled. But it was unfair for you, and CF team should give an explanation.
Yes if the runtime error would have appear during the pretest I would have changed it, a penalty of -50 is far better than awarding 0. MikeMirzayanov Please look into this
Because it is undefined behavior. Documentation
Auto comment: topic has been updated by Adonis_ (previous revision, new revision, compare).