Блог пользователя ashishranjan2828

Автор ashishranjan2828, история, 8 лет назад, По-английски

i'm getting TLE with this solution.....

http://ideone.com/8oQrcP

how to compute for lo to hi (0<lo≤hi≤10^18)... for such a large integer ...

is there any way????

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Of course you are getting TLE, just try the input

1 10^18

0 0

The trick to solve some problems of this kind is by using digit DP. If you don't know the technique I would recommend you to read this (I learned it by reading this post by the way).

http://codeforces.net/blog/entry/8221