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