suri_kumkaran's blog

By suri_kumkaran, history, 5 years ago, In English

Ashishgup

Problem B of Codeforces Round #523 has weak test cases for TLE.

Test CASE :

2 1000000000

1 1000000000

takes more than given time limit on AC solutions like this.

Thank You

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

»
5 years ago, # |
  Vote: I like it +7 Vote: I do not like it

Just copied the code and run it in codeforces custom test section. It took only 15ms

  • »
    »
    5 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    Try to add any loop of 10^10 or more and then again run custom test, still that will show 15ms, I don't know why custom test section is not giving right execution time. Logically it should give TLE.

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Added the test case for practice

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Compiler optimizations do their thing too, so it should run fast enough