Large Variations in Time

There was this competition yesterday named AARAMBH-2019. In one question to my surprise I received a TLE on submitting it, and after trying many approaches, I couldn’t get Correct Answer to the question. After the contest ended, this morning I again submitted the same solution. Guess what this time it passed with Execution Time of 0.0 Sec. Could anyone tell me why this happened?
The link to the question: https://www.codechef.com/AARA2018/problems/ARMBH1 .
The link to my solution which got TLE: https://www.codechef.com/viewsolution/21659246 .
The solution which was accepted: https://www.codechef.com/viewsolution/21663784 .
There are no changes in both the solution.

This is indeed weird.
This is my guess to what happened:

  1. Your solution should receive TLE, as it did in contest:
    for the text case T = 999;X=1,N=10^7 your program would complete in 1000 seconds.
  2. While transferring to practice, the time limit became -1 seconds. This caused the TLE solution to be accepted. Probably because some unsigned to signed conversions.

@admin please fix the -1 second time limit

Hi,

This is because the contest organizer had removed some test files during the contest. We have asked them for an explanation.

Cheers,

CodeChef

1 Like
//