Editorial for Mock CCC '18 Contest 1 J5/S3 - A Simulation Problem


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: xiaowuc1

The code reduces to summing the integers from N-1 to 1 in decreasing order and stopping when at least half of the sum is accumulated. We can binary search for when to stop.


Comments

There are no comments at the moment.