hunterr_196's blog

By hunterr_196, history, 5 years ago, In English

Please help me in understanding this that why my code is giving TLE although it giving output in 0.1 sec and my loop is running to 10^5 maximum. 10^5 is good enough for clearing in 1 sec if i am wrong then pls tell me. The problem was taken from latest codechef contest named FALL FOR CODE 2.0

QUESTION LINK :- click for question ANSWER Link:- click for answer

I checked my answer on CODEFORCE, HACKEREARTH AND CODECHEF online ide and all of them showing 0.1 sec execution time. EVEN i cross checked my answer with the correct submission made by others and put this testcase on both of the code(mine and the correctly submitted one) and it was wonder for me my code executed in 0.11 sec and his code executed in 0.14 sec STILL FOR MY CODE IT WAS SHOWING TLE.

Please help me out to understand this. A VERY BIG THANKS IN ADVANCE.

  • Vote: I like it
  • -13
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

Your code works in $$$O(n \cdot T)$$$, which is about $$$10^{10}$$$ in the worst case.