Find all surjective functions $f:\mathbb{N}\to\mathbb{N}$ such that for all positive integers $a$ and $b$, exactly one of the following equations is true: \begin{align*} f(a)&=f(b), \\ f(a+b)&=\min\{f(a),f(b)\}. \end{align*} Remarks: $\mathbb{N}$ denotes the set of all positive integers. A function $f:X\to Y$ is said to be surjective if for every $y\in Y$ there exists $x\in X$ such that $f(x)=y$.
2015 Middle European Mathematical Olympiad
Individual Competition
Let $n\ge 3$ be an integer. An inner diagonal of a simple $n$-gon is a diagonal that is contained in the $n$-gon. Denote by $D(P)$ the number of all inner diagonals of a simple $n$-gon $P$ and by $D(n)$ the least possible value of $D(Q)$, where $Q$ is a simple $n$-gon. Prove that no two inner diagonals of $P$ intersect (except possibly at a common endpoint) if and only if $D(P)=D(n)$. Remark: A simple $n$-gon is a non-self-intersecting polygon with $n$ vertices. A polygon is not necessarily convex.
Let $ABCD$ be a cyclic quadrilateral. Let $E$ be the intersection of lines parallel to $AC$ and $BD$ passing through points $B$ and $A$, respectively. The lines $EC$ and $ED$ intersect the circumcircle of $AEB$ again at $F$ and $G$, respectively. Prove that points $C$, $D$, $F$, and $G$ lie on a circle.
Find all pairs of positive integers $(m,n)$ for which there exist relatively prime integers $a$ and $b$ greater than $1$ such that $$\frac{a^m+b^m}{a^n+b^n}$$ is an integer.
Team Competition
Prove that for all positive real numbers $a$, $b$, $c$ such that $abc=1$ the following inequality holds: $$\frac{a}{2b+c^2}+\frac{b}{2c+a^2}+\frac{c}{2a+b^2}\le \frac{a^2+b^2+c^2}3.$$
Determine all functions $f:\mathbb{R}\setminus\{0\}\to \mathbb{R}\setminus\{0\}$ such that $$f(x^2yf(x))+f(1)=x^2f(x)+f(y)$$ holds for all nonzero real numbers $x$ and $y$.
There are $n$ students standing in line positions $1$ to $n$. While the teacher looks away, some students change their positions. When the teacher looks back, they are standing in line again. If a student who was initially in position $i$ is now in position $j$, we say the student moved for $|i-j|$ steps. Determine the maximal sum of steps of all students that they can achieve.
Let $N$ be a positive integer. In each of the $N^2$ unit squares of an $N\times N$ board, one of the two diagonals is drawn. The drawn diagonals divide the $N\times N$ board into $K$ regions. For each $N$, determine the smallest and the largest possible values of $K$. [asy][asy] draw((0,0)--(3,0)--(3,3)--(0,3)--cycle); draw((1,0)--(1,3), dotted); draw((2,0)--(2,3), dotted); draw((0,1)--(3,1), dotted); draw((0,2)--(3,2), dotted); draw((1,0)--(0,1)--(2,3)--(3,2)--(2,1)--(0,3)); draw((1,1)--(2,0)--(3,1)); label("$1$",(0.35,2)); label("$2$",(1,2.65)); label("$3$",(2,2)); label("$4$",(2.65,2.65)); label("$5$",(0.35,0.35)); label("$6$",(1.3,1.3)); label("$7$",(2.65,0.35)); label("Example with $N=3$, $K=7$",(0,-0.3)--(3,-0.3),S); [/asy][/asy]
Let $ABC$ be an acute triangle with $AB>AC$. Prove that there exists a point $D$ with the following property: whenever two distinct points $X$ and $Y$ lie in the interior of $ABC$ such that the points $B$, $C$, $X$, and $Y$ lie on a circle and $$\angle AXB-\angle ACB=\angle CYA-\angle CBA$$ holds, the line $XY$ passes through $D$.
Let $I$ be the incentre of triangle $ABC$ with $AB>AC$ and let the line $AI$ intersect the side $BC$ at $D$. Suppose that point $P$ lies on the segment $BC$ and satisfies $PI=PD$. Further, let $J$ be the point obtained by reflecting $I$ over the perpendicular bisector of $BC$, and let $Q$ be the other intersection of the circumcircles of the triangles $ABC$ and $APD$. Prove that $\angle BAQ=\angle CAJ$.
Find all pairs of positive integers $(a,b)$ such that $$a!+b!=a^b + b^a.$$
Let $n\ge 2$ be an integer. Determine the number of positive integers $m$ such that $m\le n$ and $m^2+1$ is divisible by $n$.