O(n * m * log k)
rust []\nuse std::collections::*;\nuse std::cmp::*;\nimpl Solution {\n    pub fn kth_largest_value(matrix: Vec<Vec<i32>>, k: i32) -> i32 {\n        let m = matr
```rust []\nuse std::collections::*;\nuse std::cmp::*;\nimpl Solution {\n    pub fn kth_largest_value(matrix: Vec<Vec<i32>>, k: i32) -> i32 {\n        let m = matrix.len();\n        let n = matrix[0].len();\n        let mut horizontal_prefix_sums = vec![0; m];\n        let mut h = BinaryHeap::with_capacity(k as usize + 1);\n        for j in 0..n {\n            let mut prev_sum = 0;\n            for i in 0..m {\n                horizontal_prefix_sums[i] ^= matrix[i][j];\n                let sum = horizontal_prefix_sums[i] ^ prev_sum;\n                prev_sum = sum;\n                h.push(Reverse(sum));\n                if h.len() > k as usize {\n                    h.pop();\n                }\n            }\n        }\n        return h.peek().unwrap().0;\n    }\n}\n```
['Rust']