Brute Force 
IntuitionThe problem requires performing multiple range increment operations on a 2D matrix of size n x n. Each range is represented by its top-left and bottom-
# Intuition
The problem requires performing multiple range increment operations on a 2D matrix of size n x n. Each range is represented by its top-left and bottom-right corner coordinates. The goal is to increment all the cells within the given rectangular range for each query and return the final state of the matrix. The algorithm essentially uses nested loops to iterate over each range and update the matrix accordingly.

# Approach
1. Initialization:

Create a 2D vector result of size n x n initialized to zeros. This matrix will store the final output.

2. Processing Queries:

For each query in the queries vector:

- Extract the range (row1, col1) (top-left) and (row2, col2) (bottom-right).

- Iterate through all rows between row1 and row2 (inclusive).

- For each row, iterate through all columns between col1 and col2 (inclusive).

- Increment the corresponding cell in the matrix result.

3. Return Result:

After processing all the queries, return the updated result matrix.

# Complexity
- Time complexity: O(n*n*n)

- Space complexity: O(n*n)

# Code
```cpp []
class Solution {
public:
    vector<vector<int>> rangeAddQueries(int n, vector<vector<int>>& queries) {
        vector<vector<int>> result(n,vector<int>(n, 0));
        for(int i=0;i<queries.size();i++){
            for(int j=queries[i][0];j<=queries[i][2];j++){
                for(int k=queries[i][1];k<=queries[i][3];k++){
                    result[j][k] += 1;
                }
            }
        }
        return result;
    }
};



```
['Matrix']