Here's a question, is it possible to implement a data structures that supports these operations online:
- 2d Range update(only the add operation, no negative number for adding)
- 2d Range queries(get the sum)
- use Low memory(possibly $$$O(nlogn)$$$)
Here are the constraints:
- $$$n \leq 10^5$$$
- $$$q \leq 10^5$$$
I think a fenwick tree could work but I'm not sure if it will TLE or not.
If anyone could verify that using a fenwick tree could work please let me know. Thanks in advance!