C++ straightforward solution similar to 2D prefix sum
Idea:\n1. use r to record prefix sum for each row\n2. use s to calculate prefix sum\n\nint kthLargestValue(vector<vector<int>>& matrix, int k) \n{\n\tint m=matr
Idea:\n1. use r to record prefix sum for each row\n2. use s to calculate prefix sum\n```\nint kthLargestValue(vector<vector<int>>& matrix, int k) \n{\n\tint m=matrix.size(),n=matrix[0].size();\n\tint r[(m+1)*(n+1)],s[(m+1)*(n+1)];\n\tmemset(r,0,sizeof(r));\n\tmemset(s,0,sizeof(s));\n\tfor(int i=1;i<=m;i++)\n\t\tfor(int j=1;j<=n;j++)\n\t\t\tr[i*(n+1)+j]=r[i*(n+1)+j-1]^matrix[i-1][j-1];\n\n\tfor(int j=1;j<=n;j++)\n\t\tfor(int i=1;i<=m;i++)\n\t\t\ts[i*(n+1)+j]=s[(i-1)*(n+1)+j]^r[i*(n+1)+j];\n\t\n\tsort(s,s+(m+1)*(n+1));\n\treturn s[(m+1)*(n+1)-k];\n}\n```
[]