Find the Maximum Sum of Node Values
Each flip changes two values, so flip every value whose xor with k increases the sum, and if that count is odd, give up the smallest gain.
Each flip changes two values, so flip every value whose xor with k increases the sum, and if that count is odd, give up the smallest gain.