When submitting a solution in C++, please select either C++14 (GCC 6-32) or C++17 (GCC 7-32) as your compiler. ×

white_square's blog

By white_square, history, 10 months ago, In English

Hey,

I tried solving problem 96B - Lucky Numbers (easy) and it gave me very strange TLE.

My submission 207541848 got TLE at n=10^9, but the same code passes the same test cases on the codeforces custom test compiler with a time of 1300ms (approximated).

As the time limit is 2second, Why am i getting TLE on main test?

 main test tle picture

 Custom test time limit picture

Now the rest of the solution is right and fits under the time limit. I just made a special case with n=10^9 and passed the main test. 207553081

Please help me figuring out what's happening wrong.

Thank you

white_square

  • Vote: I like it
  • +15
  • Vote: I do not like it

»
10 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by white_square (previous revision, new revision, compare).

»
10 months ago, # |
  Vote: I like it +30 Vote: I do not like it

Old problems runtime are doubled, because judges back then was much slower. So your solution needs to run in under 1 second in codeforces custom test