A problem on array bitwise-OR sums

Правка en1, от piggy123, 2025-03-28 05:32:42

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)$$$.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский piggy123 2025-03-28 05:32:42 324 Initial revision (published)