Execution time difference in practice section and in contest

I was solving a problem from Dec15 challenge CHEFFILT Problem - CodeChef which i had previously solved in the challenge itself. The execution time of the problem was 0.99 sec when i solved in the contest CodeChef: Practical coding for everyone … But when i resubmitted the exactly same solution in practice section it show tle in the last case CodeChef: Practical coding for everyone … Why did this happen?

3 Likes

Your code ran in 0.99 seconds which is only ~0.01s from the time limit. Execution time is not constant for a given program. I’ve seen it fluctuate by around 0.01-0.03s in my submissions.

2 Likes

Thanks for the explanation

2 Likes

You’re welcome!