c++ | easy | short
\n# Code\n\nclass Solution {\npublic:\n   int kthLargestValue(vector<vector<int>>& nums, int k) {\n        int m=nums.size(),n=nums[0].size();\n        vector<v
\n# Code\n```\nclass Solution {\npublic:\n   int kthLargestValue(vector<vector<int>>& nums, int k) {\n        int m=nums.size(),n=nums[0].size();\n        vector<vector<int>>top=nums;\n        for(int j=0;j<n;j++){\n            for(int i=1;i<m;i++){\n                top[i][j]^=top[i-1][j];\n            }\n        }\n        priority_queue<int,vector<int>,greater<int>>pq;\n        for(int i=0;i<m;i++){\n            for(int j=0;j<n;j++){\n                nums[i][j]=top[i][j];\n                if(j)\n                    nums[i][j]^=nums[i][j-1];\n                int curr=nums[i][j];\n                if(pq.size()==k){\n                    if(pq.top()<curr){\n                        pq.pop();\n                        pq.push(curr);\n                    }\n                }else{\n                    pq.push(curr);\n                }\n            }\n        }\n        return pq.top();\n    }\n};\n```
['C++']