Skip to main content
OlympiadHQ

Browse · MathNet

Print

Macedonian Mathematical Olympiad

North Macedonia counting and probability

Problem

A total of coins are arranged in boxes. In the beginning the numbers of coins in the boxes are consecutive numbers. Martha has to choose and take one of the boxes, but previously she is allowed to do the following transformation finitely many times: from a box in which there are at least four coins to move one coin to every other box. With how many coins can Martha leave at most?
Solution
That number of coins can be achieved by the following procedure: In every move if the box that is second by number of coins there are at least four coins, we move one coin to every other box, and this transformation is not possible only in the moment when the arrangement in the boxes is coins seen in increasing order.
Final answer
2004

Techniques

Invariants / monovariantsGames / greedy algorithms