Simplest Solution in C++
\nclass Solution {\npublic:\n    int kthLargestValue(vector<vector<int>>& matrix, int k) {\n        int n = matrix.size();\n        int m = matrix[0].size();\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        \n        for(int i =0; i<n; i++){\n           for(int j =1; j<m; j++){\n               \n              matrix[i][j]^=matrix[i][j-1];\n               \n               \n           } \n        }\n        \n           for(int i =0; i<m; i++){\n           for(int j =1; j<n; j++){\n               \n              matrix[j][i]^=matrix[j-1][i];\n               \n               \n           } \n        }\n        \n        priority_queue<int,vector<int>, greater<int>> pq;\n        for(int i =0; i<n; i++){\n            for(int j =0; j<m; j++){\n                pq.push(matrix[i][j]);\n            }\n        }\n        \n        while(pq.size()>k){\n            pq.pop();\n        }\n        \n        return pq.top();\n    }\n    \n};\n```
[]