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

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

I'm getting tle with normal divisor algorithm. Is there some extra needed concept required for this problem..

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

»
7 лет назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

You should fill a dp ( dp[i] = number of divisors of i) before getting tests.

Then use partial sum on dp and answer each query in O(1).

So similar to 546D - Солдат и игра с числами.

So use a fast input ouput like scanf printf.