2ndSequence's blog

By 2ndSequence, history, 4 years ago, In English

I was trying to solve this problem but i am totally stuck.

I can use binary lifting to know the sum from node a to b i believe or walk specific number of moves but i can't just figure out how i will maintain that multiplication process.

I also faced other problems like this before but i couldn't solve any sadly so hope if someone can give me a hint, or explain any valid solution.

Similar problems like adding arithmetic progression to a specific range.

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