solve maximizing-xor