Problem 3068 · Hard

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.

Open the interactive visualisation