xor of sequence of numbers
- by ArG0NaUt
You are given with a sequence of natural numbers, you can add any natural number to any number in the sequence such that their xor becomes zero. Your goal is to minimize the sum of added numbers.
e.g. Consider the following examples :
sequence : 1, 3 answer : 2, adding 2 to 1 we get 3^3=0.
sequence : 10, 4, 5, 1 answer: 6, adding 3 to 10 & 3…