## [Solutions] United States of America Junior Mathematical Olympiad 2019

1. There are $a+b$ bowls arranged in a row, numbered $1$ through $a+b$, where $a$ and $b$ are given positive integers. Initially, each of the first $a$ bowls contains an apple, and each of the last $b$ bowls contains a pear. A legal move consists of moving an apple from bowl $i$ to bowl $i+1$ and a pear from bowl $j$ to bowl $j-1$, provided that the difference $i-j$ is even. We permit multiple fruits in the same bowl at the same time. The goal is to end up with the first $b$ bowls each containing a pear and the last $a$ bowls each containing an apple. Show that this is possible if and only if the product $ab$ is even.
2. Let $\mathbb{Z}$ be the set of all integers. Find all pairs of integers $(a,b)$ for which there exist functions $f \colon \mathbb{Z}\rightarrow \mathbb{Z}$ and $g \colon \mathbb{Z} \rightarrow \mathbb{Z}$ satisfying $f(g(x))=x+a \quad\text{and}\quad g(f(x))=x+b$ for all integers $x$.
3. Let $ABCD$ be a cyclic quadrilateral satisfying $AD^2 + BC^2 = AB^2$. The diagonals of $ABCD$ intersect at $E$. Let $P$ be a point on side $\overline{AB}$ satisfying $\angle APD = \angle BPC$. Show that line $PE$ bisects $\overline{CD}$.
4. Let $ABC$ be a triangle with $\angle ABC$ obtuse. The $A$-excircle is a circle in the exterior of $\triangle ABC$ that is tangent to side $BC$ of the triangle and tangent to the extensions of the other two sides. Let $E$, $F$ be the feet of the altitudes from $B$ and $C$ to lines $AC$ and $AB$, respectively. Can line $EF$ be tangent to the $A$-excircle?
5. Let $n$ be a nonnegative integer. Determine the number of ways that one can choose $(n+1)^2$ sets $S_{i,j}\subseteq\{1,2,\ldots,2n\}$, for integers $i,j$ with $0\leq i,j\leq n$, such that
• for all $0\leq i,j\leq n$, the set $S_{i,j}$ has $i+j$ elements; and
• $S_{i,j}\subseteq S_{k,l}$ whenever $0\leq i\leq k\leq n$ and $0\leq j\leq l\leq n$.
6. Two rational numbers $\dfrac{m}{n}$ and $\dfrac{n}{m}$ are written on a blackboard, where $m$ and $n$ are relatively prime positive integers. At any point, Evan may pick two of the numbers $x$ and $y$ written on the board and write either their arithmetic mean $\dfrac{x+y}{2}$ or their harmonic mean $\dfrac{2xy}{x+y}$ on the board as well. Find all pairs $(m,n)$ such that Evan can write 1 on the board in finitely many steps.