easy sol with no if conditions
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<vector<int>> rangeAddQueries(int n, vector<vector<int>>& queries) {\n        vector<vector<int>>mat(n+1,vector<int>(n+1));\n        vector<vector<int>>ans(n,vector<int>(n));\n        for(auto q:queries){\n            int r1=q[0],c1=q[1],r2=q[2],c2=q[3];\n            mat[r1][c1]+=1;\n            mat[r1][c2+1]-=1;\n            mat[r2+1][c1]-=1;\n            mat[r2+1][c2+1]+=1;\n            \n        }\n        \n        for(int j=1;j<n+1;j++){\n            mat[0][j]=mat[0][j]+mat[0][j-1];\n        }\n        for(int j=1;j<n+1;j++){\n            mat[j][0]=mat[j][0]+mat[j-1][0];\n        }\n        for(int i=1;i<n+1;i++){\n            for(int j=1;j<n+1;j++){\n                mat[i][j]+=mat[i][j-1]+mat[i-1][j]-mat[i-1][j-1];\n            }\n        }\n\n        for(int i=0;i<n;i++){\n            for(int j=0;j<n;j++){\n                ans[i][j]=mat[i][j];\n            }\n            // cout<<endl;\n        }\n   return ans;\n    }\n};\n```
['C++']