## [Solutions] Balkan Mathematical Olympiad 2019

1. Let $\mathbb{P}$ be the set of all prime numbers. Find all functions $f:\mathbb{P}\rightarrow\mathbb{P}$ such that $$f(p)^{f(q)}+q^p=f(q)^{f(p)}+p^q$$ holds for all $p,q\in\mathbb{P}$.
2. Let $a,b,c$ be real numbers such that $$0 \leq a \leq b \leq c,\quad a+b+c=ab+bc+ca >0.$$ Prove that $\sqrt{bc}(a+1) \geq 2$ and determine the equality cases.
3. Let $ABC$ be an acute scalene triangle. Let $X$ and $Y$ be two distinct interior points of the segment $BC$ such that $\angle{CAX} = \angle{YAB}$. Suppose that
• $K$ and $S$ are the feet of the perpendiculars from from $B$ to the lines $AX$ and $AY$ respectively.
• $T$ and $L$ are the feet of the perpendiculars from $C$ to the lines $AX$ and $AY$ respectively.
Prove that $KL$ and $ST$ intersect on the line $BC$.
4. A grid consists of all points of the form $(m, n)$ where $m$ and $n$ are integers with $|m|\le 2019$, $|n| \le 2019$ and $|m| +|n| < 4038$. We call the points $(m,n)$ of the grid with either $|m| = 2019$ or $|n| = 2019$ the boundary points. The four lines $x = \pm 2019$ and $y= \pm 2019$ are called boundary lines. Two points in the grid are called neighbours if the distance between them is equal to $1$. Anna and Bob play a game on this grid. Anna starts with a token at the point $(0,0)$. They take turns, with Bob playing first.
• On each of his turns. Bob deletes at most two boundary points on each boundary line.
• On each of her turns. Anna makes exactly three steps, where a step consists of moving her token from its current point to any neighbouring point, which has not been deleted.
As soon as Anna places her token on some boundary point which has not been deleted, the game is over and Anna wins. Does Anna have a winning strategy?