TLE and WA

If my solution is both WA and TLE, will it say it a WA or TLE? i.e Can a TLE solution be wrong also?

It will give you TLE if the case that gets a wrong answer is to be compiled after the given time. If such a case compiles even before the time limit then it gives a WA.

1 Like

@o1e3:

a good explanation by betlista: see this link

Yes A TLE solution can be WRONG. If Your solution results WA for one submission and TLE for another submission, this means that your solution’s running time is very close to the alloted timelimit.

  1. So when you got WA, your program provided the solution but it was wrong

  2. When you got TLE, The Time limit was exceeded before your program could provide the result(so your solution is not checked since the program already resulted in TLE )

1 Like

what does Result-AC mean?

1 Like

@ shubham_upadhy
AC means Accepted. Your program ran successfully and gave a correct answer.

The time limit of question is 1.00 sec

I have a doubt , if I get a WA at 0.97 sec does it means that my code produced correct for most test cases .

Did you find answer to this?