Apply exactly X halving operations to an array of weights so that the final total is as small as possible.
Apply exactly X halving operations to an array of weights so that the final total is as small as possible.
The discussion opens with the full question.