decoder123's blog

By decoder123, 8 years ago, In English

I have tried to solve this... I have tried Brute force. Can anybody provide a intuitive idea — how to solve this. The thing is here we can't divide the range in blocks as the update in the array are not consecutive. This is my first sqrt decomposition problem.

Problem statement

Editorial

  • Vote: I like it
  • +3
  • Vote: I do not like it