You are not logged in. Please login at to post your questions!


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

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

asked 10 Apr '13, 14:30

rudreshwar's gravatar image

accept rate: 50%

edited 10 Apr '13, 15:58

admin's gravatar image

0★admin ♦♦

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!


answered 10 Apr '13, 14:31

admin's gravatar image

0★admin ♦♦
accept rate: 35%

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

(10 Apr '13, 17:46) shahid_khan5★

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.

(10 Apr '13, 20:47) bugkiller3★

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?

(10 Apr '13, 23:13) banarun4★

@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.

(11 Apr '13, 01:01) bugkiller3★

This question has been asked and answered before. Refer to this:


answered 11 Apr '13, 02:42

kullalok's gravatar image

accept rate: 14%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 10 Apr '13, 14:30

question was seen: 10,630 times

last updated: 11 Apr '13, 02:42