NotStack's blog

By NotStack, history, 20 months ago, In English

I noticed that after system testing, Codeforces reruns all the solutions submitted after the round, and this process takes hours. I’m curious—why is this necessary?

Wouldn't it be more efficient to check the database to see if a solution was already accepted or marked wrong instead of re-evaluating everything? Running all solutions again is a heavy task that puts unnecessary load on the server, slowing down Codeforces significantly.

  • Vote: I like it
  • -9
  • Vote: I do not like it

| Write comment?
»
20 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Well, sometimes, during contests, because of the huge number of people, solutions pass even though they aren't technically supposed to. Usually, these are cases where solutions normally TLE or MLE, but they pass during the contest.

»
20 months ago, hide # |
 
Vote: I like it +12 Vote: I do not like it

Are you referring to system testing that takes place after a Div. 3 or Educational Round?

If so, after the hacking phase concludes, the system re-evaluates all solutions using the newly added test cases.

»
20 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

During a contest, only a few pretests a run so that the server can handle the thousands of in-contest submissions. One thing I have noticed, however, is that some problems have 100s of test cases even when only 10 or so are needed to account for all edge cases. 90% of test cases do not fail a single solution, so they are basically useless.