Time Limit Exceded

Does time limit exceded guarantees that the answer is right?

1 Like

NO
IT TELLS THAT NO. OF TEST CASES PROCESSED ARE CORRECT .IT MAY HAPPEN THAT THAT UR CODE ISN’T CORRECT FOR
SOME UNPROCESSED CASE.

The Time Limit Exceeded does not guarantee ,whether the answer is right or wrong.

First Let me share a brief Idea - How the code-chef Judge works?

(1)The Code-chef Judge sends your submitted solution to the Server/Engine at Sphere Research Labs,where the server compiles and then runs your program with the standard input of the code-chef official Input Text File[Note Along with your code ,the Client Code chef sends the Standard Input,Time-Limits,etc.,to the Server] .

(2)Then ,After compiling and Executing,the Sphere Lab Engine sends back the output generated [by your solution/code] as a string (Along with the Verdict(Ac,WA,TLE,RTE), Time-Taken ,Memory Used and Several other return code) to the client code-chef .

(3)Now the code-chef compares the output string sent by the sphere Engine with its official output text-file,by simple File Handling.(Note in case of TLE,the Sphere Engine sends back the the Empty output string .)

So,When the Client Codechef receives the status as Time-limit Exceeded From the Sphere Lab Server,then it does not even compare your solution with its standard output Text-file.

So ,roughly ,by Time Limit Exceeded means , Per-file,the code-chef did not check the o/p [Even Partial o/p]generated by your code against its Expected o/p.

Thus You can’t say ,anything about the Correctness of your solution.

This is the Most common question asked in the Codechef Forum.So I hope the above explanation clears your doubt .

5 Likes