Rust 100% iter flatten fold
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)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```rust []\nimpl Solution {\n    pub fn max_matrix_sum(matrix: Vec<Vec<i32>>) -> i64 {\n        let (total, min_abs, neg_count) = matrix\n            .iter()\n            .flatten()\n            .fold((0_i64, i32::MAX, 0), |(total, min_abs, neg_count), &num| {\n                (\n                    total + num.abs() as i64,\n                    min_abs.min(num.abs()),\n                    neg_count + if num < 0 { 1 } else { 0 },\n                )\n            });\n    \n        if neg_count % 2 == 1 {\n            total - (min_abs as i64 * 2)\n        } else {\n            total\n        }\n    }\n}\n```
['Rust']