ashishranjan2828's blog

By ashishranjan2828, history, 8 years ago, In English

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????

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

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://mirror.codeforces.com/blog/entry/8221