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

Автор decoder123, 9 лет назад, По-английски

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

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