When learning about 2D BIT, I have the question that 2D BIT can be easily updated 1 element and get sum, but can update the range ?↵
↵
Problem:↵
↵
for each query, you need to update the rectangle↵
(x, y, u, v) each coordinate of a rectangle with upper left corner (x, y) and lower right corner being (u, v) incremented by c "at the same time".↵
↵
After the update, we can find the sum query (x1,x2,y1y1,x2,y2);↵
↵
For example:↵
↵
![ ](/predownloaded/52/b4/52b44db3d2c5aee96e08bab6816700ee4dbdee71.png)↵
↵
Sum(2,3,3,4) is 28;↵
↵
Is it possible to solve this problem? If so, please show how to do it!!!↵
↵
thanks for help!!!↵
↵
Problem:↵
↵
for each query, you need to update the rectangle↵
(x, y, u, v) each coordinate of a rectangle with upper left corner (x, y) and lower right corner being (u, v) incremented by c "at the same time".↵
↵
After the update, we can find the sum query (x1,
↵
For example:↵
↵
![ ](/predownloaded/52/b4/52b44db3d2c5aee96e08bab6816700ee4dbdee71.png)↵
↵
Sum(2,3,3,4) is 28;↵
↵
Is it possible to solve this problem? If so, please show how to do it!!!↵
↵
thanks for help!!!↵