C++ || Simple prefix XOR || Clean Code || T.C. O(n*m) ✅✅
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)$$ -->\nO(n*m)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n*m)\n\n# Code\n```\nclass Solution {\npublic:\n    int kthLargestValue(vector<vector<int>>& matrix, int k) {\n        int n = matrix.size();\n        int m = matrix[0].size();\n        vector<vector<int>> ans(n, vector<int>(m, 0));\n        priority_queue<int> q;\n        for(int i=0;i<n;i++){\n            for(int j=0;j<m;j++){\n                int xr = matrix[i][j];\n                if(i-1>=0){\n                    xr = xr^ans[i-1][j];\n                }\n                if(j-1>=0){\n                    xr = xr^ans[i][j-1];\n                }\n                if(i-1>=0 && j-1>=0){\n                    xr = xr^ans[i-1][j-1];\n                }\n                ans[i][j] = xr;\n                q.push(xr);\n            }\n        }\n        k = k-1;\n        while(k--){\n            q.pop();\n        }\n        return q.top();\n\n    }\n};\n```
['C++']