NOBEL - Weird issue giving TLE on correct answer

Hi There,

I was tried a submission yesterday on NOBEL problem, hosted in yesterday’s starter contest. I made two identical submissions Sub 1 gave me a TLE, and Sub 2 cleared the test The solution matches editorialist’s code, so I figured this could happen again even on correct solutions.

Can someone point out if I did something in the code which gives irregularity in result. I lost 20 mins during the competition due to this, won’t like to repeat that.

You can look at the same issue encountered in Codechef Rated Contest.

@admin Congratulations :clap: on another issue.

I don’t think it could be any weirder than this, I mean removing one comment changes a TLE to AC.
I agree that the AC solution just passed the time limit but still.
PS: Add Fast IO in your code to avoid these issues.

1 Like

Lol, getting weirder.
Your TLE code giving AC now.

1 Like

I don’t know how to respond. I submitted again but it’s still a TLE for me @admin

:rofl: :rofl: :rofl: :rofl:

Execution times are very close in the case (although I have seen weird cases when difference in times is more)

Maybe somewhat different issue-
I don’t understand why this solution would give TLE.
It’s just one test case with an array of size 100.

True, but I don’t understand why would the same code pass and the other one TLE when there’s not a difference of a single space for 2 different users.

1 Like

Execution times can fluctuate by ±x if x is reasonable depending on the load etc. The difference isn’t much in this case. It’s possible that the same solution takes 0.49 s in one submission and 0.51 in other. The difference in this case isn’t much.

This is a serious issue. Codechef should look into this ASAP. I think a time limit of 1s will rectify the problem, since a non-optimal solution will of course take considerably more time.