Marco_L_T's blog

By Marco_L_T, history, 7 years ago, In English

Reyna's submission of Problem A in today's contest got Wrong Answer verdict.As Reyna is very good at coding,I felt a little strange.However,when I looked at the detailed feedback,it showed that it couldn't find a file,which I never saw before.More strangely,I re-submitted Reyna's code and then got AC verdict.

Submission

So,could anyone tell me what the reason was or it was a bug in Codeforces? Thanks!

UPD: The issue is fixed now.

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

»
7 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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

»
7 years ago, # |
Rev. 2   Vote: I like it -13 Vote: I do not like it

I do not think that it is valid for the main function not to return a value.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +10 Vote: I do not like it

    It is completely valid. I barely return a value for my main.

»
7 years ago, # |
  Vote: I like it +15 Vote: I do not like it

I suppose the judge had a bug, and it was solved, but his submission wasn't rejudged.

»
7 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

His solution has sorting but takes 15 ms whereas my solution does not include sorting but takes 30 ms.

Can someone explain why so that I can improve my solution ?

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    In my opinion,there isn't much difference between 15 ms and 30 ms,and they all mean a very fast solution.If you submit your code one more time,maybe you can get 15 ms or even 0 ms.

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +2 Vote: I do not like it

      Thanks. Here's my submission. Please let me know if I did anything wrong and why it's taking the extra time or if it's just a bug.

      • »
        »
        »
        »
        7 years ago, # ^ |
          Vote: I like it +5 Vote: I do not like it

        Your solution is really an O(N) one and it's the best complexity that can be got on Problem A. As n<=100, the speed of an O(N) solution and an O(NlogN) solution don't have a big difference.