Editorial for An Animal Contest 2 P0 - Koala Matchmaking


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: ThingExplainer

It is always optimal to choose N - 2 to be X, giving an average of N - 1 as our answer. Note that we cannot choose N - 1 to be X since the resulting average would not be an integer.


Comments

There are no comments at the moment.