We have a problem about how to quickly calculate the sums on the segment l...r in the array a, in which the elements can change one at a time, in asymptotics less than O(n).

This task is solved similarly to the previous one, but when requesting a change, you need to change the amount in the corresponding block.