TLE Time to run sent in mail by code chef

i am solving a problem that has time limit 1 sec.In my mail the running time sent by codechef is 2.48sec.
After some optimization now the time is 1.03 sec < is this means that my current solution is better than previous or this more worse as it is running for less time which may be becuase it is passing less testcases.pls help ??i am trying for 2 days now

Yes your new code is better than the previous one ! the time shown is sum of execution time for all the test case files

If you are getting ac then your new solution is better , as the time is sum of all the test cases , but if you are getting wa , then may be your new solution is not that good . If you provide submission link or question link it would be good .

It can be either way!

  1. If you are sure that your optimizations have made the code reasonably faster (try running both codes for same large cases, preferably the toughest one), then your code has improved.
  2. Other possibility is that you are now tleing in the first file itself, as the new running time says that you might have tripped on first file itself.

In any case, executing code locally on the worst case would be helpful.


I am not getting ac i am getting tle for both submission

I dont think that t is wrong to answer this question during contest.

I don`t think there is a time in case of tle programs , may be your second program is better , it may be other way also .