My code has been getting TLE. Does it mean that it’s correct but is taking too long to run?
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!
This question has been asked and answered before. Refer to this: http://discuss.codechef.com/questions/6085/time-limit-exceeded?page=1#6097
@admin: does that mean programs are judged file by file and not testcase by testcase?
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.
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?