rust simplest solution with explain
Intuition\nWhy I need edges? If you want to flip a and b, you can always find a path from a to b, and file all the path twice.\n\nSo you can filp as many time y
# Intuition\nWhy I need edges? If you want to flip a and b, you can always find a path from a to b, and file all the path twice.\n\nSo you can filp as many time you want, just make sure the total flip time is even.\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\nimpl Solution {\n    pub fn maximum_value_sum(nums: Vec<i32>, k: i32, edges: Vec<Vec<i32>>) -> i64 {\n        let k = k as i64;\n        let mut res=0;\n        let mut sac=std::i64::MAX;\n        let mut count=0;\n        for &i in &nums{\n            let i = i as i64;\n            let fi=i^k;\n            if fi>i{\n                res+=fi;\n                count+=1;\n                sac=std::cmp::min(sac, fi-i);\n            }else{\n                res+=i;\n                sac=std::cmp::min(sac, i-fi);\n            }\n        }\n        if count%2==1{\n            res-sac\n        }else{\n            res\n        }\n    }\n}\n```
['Rust']