If my code gets TLE, does that mean it is correct but takes too long?

faq
tle

#1

My code has been getting TLE. Does it mean that it’s correct but is taking too long to run?


#2

No, TLE simply means you exceeded the time limit. Your program never finished running in time - so Codechef has no idea whether it was going to print out the right results or not!


#3

This question has been asked and answered before. Refer to this: http://discuss.codechef.com/questions/6085/time-limit-exceeded?page=1#6097


#4

@admin: does that mean programs are judged file by file and not testcase by testcase?


#5

A test file is a collection of one or more test cases. A collection of such test files make the entire testing data on which your code is checked.


#6

Say if there are 20 test files, If code is was able to run in time for first 5 test files. Will they be judged?


#7

@banarun >> TLE means your code ran out of time for a test file. Now that test file may be the first one, or the second one and so on. And a solution gets AC only when it passes all the cases, doesn’t matter whether your solution passed 5 or your car blew up or anything else.