easy solution
Intuitionuse difference array technique on each row to quickly increment the subarray by an amount in 0(1)ApproachComplexity
Time complexity:

Space complexity:
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
use difference array technique on each row to quickly increment the subarray by an amount in 0(1)

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def rangeAddQueries(self, n: int, queries: List[List[int]]) -> List[List[int]]:
        res = [[0] * n for i in range(n)]
        print(res)
        for q in queries:
            rs, re = q[0], q[2]
            cs, ce = q[1], q[3]
            for i in range(rs, re + 1):
                res[i][cs] += 1
                if ce + 1 < len(res[i]):
                    res[i][ce + 1] -= 1
        print(res)

        #[[1, 0, -1], 
        #[1, 1, -1], 
        #[0, 1, 0]]

        ans = []
        for r in res:
            ans.append(list(itertools.accumulate(r)))
        return ans

        


                




```
['Python3']