### whitecow's blog

By whitecow, 11 days ago,

Let's say I am solving some question 'Q' with time limit 1 second and space limit 256 MB. Upon submitting, I get MLE for 4 out of 5 test cases and TLE on the last TC. Also, the TCs which are giving MLE are showing a runtime of <=0.5 seconds (let's call this run time as 'x').

Based on the above scenario, which of the following statement is correct?

1) The run time 'x' is the total run time of that TC if we ignore the MLE?

or

2) The code got terminated at xth moment of time (for that TC) as soon as it encountered MLE?

Which of the above option is correct, or is there any other explanation to this?

• +1

 » 11 days ago, # | ← Rev. 2 →   +7 I really think that second case is what actually happens, because if you have infinite recursion in your programm, your solution can got MLE, and time will be like 264 ms with TL 3s. In my opinion, that means that program stopped right after it had encountered MLE. After all, second case is more logical. Why would codeforces leave additional load to servers?