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.↵
↵
For example:↵
↵
![ ](/predownloaded/52/b4/52b44db3d2c5aee96e08bab6816700ee4dbdee71.png)↵
↵
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.↵
↵
For example:↵
↵
![ ](/predownloaded/52/b4/52b44db3d2c5aee96e08bab6816700ee4dbdee71.png)↵
↵
Is it possible to solve this problem? If so, please show how to do it!!!↵
↵
thanks for help!!!↵