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

Автор piggy123, история, 13 месяцев назад, По-английски

We have an array of integers $$$a_{1...n}$$$, and we have $$$q$$$ updates where we change one of the elements of it. After each update, we need to output the bitwise-OR sum of the entire array. Could this be done(offline) in linear time?

Consider the bitwise operations on integers to be $$$O(1)$$$.

Полный текст и комментарии »

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