2018 Azerbaijan IMO TST

Day 1

1

Let $ p \geq 2$ be a prime number. Eduardo and Fernando play the following game making moves alternately: in each move, the current player chooses an index $i$ in the set $\{0,1,2,\ldots, p-1 \}$ that was not chosen before by either of the two players and then chooses an element $a_i$ from the set $\{0,1,2,3,4,5,6,7,8,9\}$. Eduardo has the first move. The game ends after all the indices have been chosen .Then the following number is computed: $$M=a_0+a_110+a_210^2+\cdots+a_{p-1}10^{p-1}= \sum_{i=0}^{p-1}a_i.10^i$$. The goal of Eduardo is to make $M$ divisible by $p$, and the goal of Fernando is to prevent this. Prove that Eduardo has a winning strategy. Proposed by Amine Natik, Morocco

2

In triangle $ABC$, let $\omega$ be the excircle opposite to $A$. Let $D, E$ and $F$ be the points where $\omega$ is tangent to $BC, CA$, and $AB$, respectively. The circle $AEF$ intersects line $BC$ at $P$ and $Q$. Let $M$ be the midpoint of $AD$. Prove that the circle $MPQ$ is tangent to $\omega$.

3

Sir Alex plays the following game on a row of 9 cells. Initially, all cells are empty. In each move, Sir Alex is allowed to perform exactly one of the following two operations: Choose any number of the form $2^j$, where $j$ is a non-negative integer, and put it into an empty cell. Choose two (not necessarily adjacent) cells with the same number in them; denote that number by $2^j$. Replace the number in one of the cells with $2^{j+1}$ and erase the number in the other cell. At the end of the game, one cell contains $2^n$, where $n$ is a given positive integer, while the other cells are empty. Determine the maximum number of moves that Sir Alex could have made, in terms of $n$. Proposed by Warut Suksompong, Thailand

Day 2

1

Let $q$ be a real number. Gugu has a napkin with ten distinct real numbers written on it, and he writes the following three lines of real numbers on the blackboard: In the first line, Gugu writes down every number of the form $a-b$, where $a$ and $b$ are two (not necessarily distinct) numbers on his napkin. In the second line, Gugu writes down every number of the form $qab$, where $a$ and $b$ are two (not necessarily distinct) numbers from the first line. In the third line, Gugu writes down every number of the form $a^2+b^2-c^2-d^2$, where $a, b, c, d$ are four (not necessarily distinct) numbers from the first line. Determine all values of $q$ such that, regardless of the numbers on Gugu's napkin, every number in the second line is also a number in the third line.

2

Let $N$ be an odd number, $N\geq 3$. $N$ tennis players take part in a championship. Before starting the championship, a commission puts the players in a row depending on how good they think the players are. During the championship, every player plays with every other player exactly once, and each match has a winner. A match is called suprising if the winner was rated lower by the commission. At the end of the tournament, players are arranged in a line based on the number of victories they have achieved. In the event of a tie, the commission's initial order is used to decide which player will be higher. It turns out that the final order is exactly the same as the commission's initial order. What is the maximal number of suprising matches that could have happened.

3

Find the smallest positive integer $n$ or show no such $n$ exists, with the following property: there are infinitely many distinct $n$-tuples of positive rational numbers $(a_1, a_2, \ldots, a_n)$ such that both $$a_1+a_2+\dots +a_n \quad \text{and} \quad \frac{1}{a_1} + \frac{1}{a_2} + \dots + \frac{1}{a_n}$$are integers.

Day 3

1

Let $m$ and $n$ be natural numbers. Professor Mubariz has $m$ folders and Professor Nazim has $n$ folders; initially, all folders are empty. Every day, where the day numbers are marked as $d = 1,2,3 ....,$ Prof. Mubariz is given $2018$ blue papers, and Prof. Nazim is given $2018$ orange papers. On day $d ( d = 1, 2, 3, ...),$ they both perform the following operations: If the $2018$ papers given to this professor are not enough to place $d$ papers in each of his folders, then he distributes all the $2018$ papers given to him to his students. If the $2018$ papers given to this professor are enough to place $d$ papers in each of his folders, firstly, he places $d$ papers in each of his folders. If this professor still has papers left after the first step, he places them in the other professor's folders, with the same number in each folder and as many as possible. If this professor still has papers left after the second step, he distributes them to his students. Prove that after $6$ years, the number of blue papers in one folder of Prof. Nazim will be equal to the number of orange papers in one folder of Prof. Mubariz.

2

Determine all integers $ n\geq 2$ having the following property: for any integers $a_1,a_2,\ldots, a_n$ whose sum is not divisible by $n$, there exists an index $1 \leq i \leq n$ such that none of the numbers $$a_i,a_i+a_{i+1},\ldots,a_i+a_{i+1}+\ldots+a_{i+n-1}$$is divisible by $n$. Here, we let $a_i=a_{i-n}$ when $i >n$. Proposed by Warut Suksompong, Thailand

3

A sequence of real numbers $a_1,a_2,\ldots$ satisfies the relation $$a_n=-\max_{i+j=n}(a_i+a_j)\qquad\text{for all}\quad n>2017.$$Prove that the sequence is bounded, i.e., there is a constant $M$ such that $|a_n|\leq M$ for all positive integers $n$.