Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The operation described only transfers some bits from one element to another in their binary representation.
To have a maximum sum of squares, it is optimal to greedily make each number as big as possible.