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

Автор Plasmatic, история, 5 лет назад, По-английски

It's come to a point where if I see that my solution is 'stuck' on a case, I automatically assume that it's incorrect somehow.

Does anyone know why this happens?

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

»
5 лет назад, # |
Rev. 3   Проголосовать: нравится +50 Проголосовать: не нравится

Running on test x .

A few moments passes .

Wrong answer on test x .

Its been common in last few days .

»
5 лет назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

This might be the case for solutions near the Time Limit which are executed multiple times. Not sure what is the used strategy, but I guess is something among the lines, if execution time of the submission is more than time limit, but less than time limit + some threshold execute again (do it 1 or 2 times). Solution will be considered TLE if all executions were out of time.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +133 Проголосовать: не нравится

    It doesn't happen only with TLE submissions. I observed similar things with WA submissions which are not close to TL. Testcase number that is executed is updated every ~3s but then it got stuck on test e.g. 12 and after 10s it shows WA on test 14.

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +87 Проголосовать: не нравится

      Also, recently I've seen a few times that after "Running on test N" I briefly see "Running on test N+1", which then swiftly changes to "WA on test N".

  • »
    »
    5 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +39 Проголосовать: не нравится

    It is a possible reason, but I think maybe the main problem is that the judge divides the test cases into different (processes or threads), in case of failure of any test, killing all (processes or threads) for higher numbered tests takes time

    • »
      »
      »
      5 лет назад, # ^ |
        Проголосовать: нравится +18 Проголосовать: не нравится

      In that case CF could show submission's verdict before killing all processes or threads.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I also find that the result of submissions always appears faster in the problem page of contests.

»
5 лет назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

On the contrary, I notice that if you submit the same code for the same problem, but under two different problem IDs (like div2C and div1A), the submission result is very fast, as if they cached my submission or something.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +39 Проголосовать: не нравится

    They definitely cache submissions, I suspect they're caching binaries. If you submit the same file with only comments that differ you'll always get the same time.

»
5 лет назад, # |
  Проголосовать: нравится +69 Проголосовать: не нравится

I always thought this had to do with the diagnostics running extra stuff to figure out what happened when the code was wrong, though I have no clue if this is actually the case.

»
5 лет назад, # |
Rev. 2   Проголосовать: нравится +63 Проголосовать: не нравится

because after non-AC verdicts, if you use C++ then CF run some diagnostics on your code to catch TLE, RTE, and errors. I don't know if there are other diagnostic tools for other languages.

»
5 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

I always thought that this is a way to stop participants from submitting too frequently, like when you know you didn't AC, sometimes you submit once again with some modified code, now you have to wait for 1 min more.

»
5 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

The comments about diagnostics are correct, you can read more about it here https://codeforces.net/blog/entry/55902

»
5 лет назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

The comments about diagnostics are obviously correct, though sometimes I have observed that after submission, when seeing the status, the page may say 'Running on test x' but upon refreshing you see 'Running on test y' instead (y>x). So sometimes the text on the status page is updated with a delay of few seconds, if you do not manually refresh the page.

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I just handed over the task, I go to the status tab and there I am no longer there.WTF?