Browse · MathNet
Print59th Ukrainian National Mathematical Olympiad
Ukraine counting and probability
Problem
Each player - Andriy and Olesya - has a set of 2019 cards, which contains numbers (each number is exactly one time for each player). The game follows the following rules. At the beginning of the game there is a card with a number on the table. After that, the players take turns (Andriy begins) to change one of their cards to the one that is currently on the table. Besides that, Andriy can change the card on the table to the one he holds, if it has a number that is greater than the number written on the card on the table, and Olesya - on her card with a smaller written number than on the card on the table. A person who cannot make a move is considered to be the loser. Who will win in this game, if everyone wants to win? (Bogdan Rublyov)
Solution
For each time Andriy plays a card , Olesya plays a card . Since Andriy has a set of cards , he must put one of the cards that is greater or equal to . Olesya plays the card back. Thus, after each move, Andriy should play a greater card, while Olesya will always have a card with a number what is 1 less than the one Andriy plays. When he plays the card with the number 2018, he will have a set of cards that will not contain the number 2018, and Olesya will have a card that contains the number 2017. She will change the card with the number 2018 to the card with the number 2017 and Andriy will not be able to make his move.
Final answer
Olesya
Techniques
Games / greedy algorithmsInvariants / monovariants