C++ solution prefix sum
\n// Please, upvote if you like it. Thanks :-)\nint kthLargestValue(vector<vector<int>>& matrix, int k) {\n\tint m = matrix.size(), n = matrix[0].size();\n\tpri
```\n// Please, upvote if you like it. Thanks :-)\nint kthLargestValue(vector<vector<int>>& matrix, int k) {\n\tint m = matrix.size(), n = matrix[0].size();\n\tpriority_queue<int, vector<int>, greater<int>> pq;\n\tvector<vector<int>> preSum(m, vector<int>(n, 0));\n\tfor (int i = 0; i < m; i++) {\n\t\tfor (int j = 0; j < n; j++) {\n\t\t\tpreSum[i][j] = matrix[i][j];\n\t\t\tif (i > 0)\n\t\t\t\tpreSum[i][j] ^= preSum[i - 1][j];\n\t\t\tif (j > 0)\n\t\t\t\tpreSum[i][j] ^= preSum[i][j - 1];\n\t\t\tif (i > 0 && j > 0)\n\t\t\t\tpreSum[i][j] ^= preSum[i - 1][j - 1];\n\t\t\tpq.push(preSum[i][j]);\n\t\t\tif (pq.size() > k)\n\t\t\t\tpq.pop();\n\t\t}\n\t}\n\treturn pq.top();\n}\n```
['Array', 'C', 'Heap (Priority Queue)', 'Prefix Sum', 'C++']