We say that a quadruple of nonnegative real numbers $(a,b,c,d)$ is balanced if $$a+b+c+d=a^2+b^2+c^2+d^2.$$Find all positive real numbers $x$ such that $$(x-a)(x-b)(x-c)(x-d)\geq 0$$for every balanced quadruple $(a,b,c,d)$. (Ivan Novak)
2021 European Mathematical Cup
Junior Division
Let $ABC$ be an acute-angled triangle such that $|AB|<|AC|$. Let $X$ and $Y$ be points on the minor arc ${BC}$ of the circumcircle of $ABC$ such that $|BX|=|XY|=|YC|$. Suppose that there exists a point $N$ on the segment $\overline{AY}$ such that $|AB|=|AN|=|NC|$. Prove that the line $NC$ passes through the midpoint of the segment $\overline{AX}$. (Ivan Novak)
Let $\ell$ be a positive integer. We say that a positive integer $k$ is nice if $k!+\ell$ is a square of an integer. Prove that for every positive integer $n \geqslant \ell$, the set $\{1, 2, \ldots,n^2\}$ contains at most $n^2-n +\ell$ nice integers. (Théo Lenoir)
Let $n$ be a positive integer. Morgane has coloured the integers $1,2,\ldots,n$. Each of them is coloured in exactly one colour. It turned out that for all positive integers $a$ and $b$ such that $a<b$ and $a+b \leqslant n$, at least two of the integers among $a$, $b$ and $a+b$ are of the same colour. Prove that there exists a colour that has been used for at least $2n/5$ integers. (Vincent Jugé)
Senior Division
Alice drew a regular $2021$-gon in the plane. Bob then labeled each vertex of the $2021$-gon with a real number, in such a way that the labels of consecutive vertices differ by at most $1$. Then, for every pair of non-consecutive vertices whose labels differ by at most $1$, Alice drew a diagonal connecting them. Let $d$ be the number of diagonals Alice drew. Find the least possible value that $d$ can obtain.
Let $ABC$ be a triangle and let $D, E$ and $F$ be the midpoints of sides $BC, CA$ and $AB$, respectively. Let $X\ne A$ be the intersection of $AD$ with the circumcircle of $ABC$. Let $\Omega$ be the circle through $D$ and $X$, tangent to the circumcircle of $ABC$. Let $Y$ and $Z$ be the intersections of the tangent to $\Omega$ at $D$ with the perpendicular bisectors of segments $DE$ and $DF$, respectively. Let $P$ be the intersection of $YE$ and $ZF$ and let $G$ be the centroid of $ABC$. Show that the tangents at $B$ and $C$ to the circumcircle of $ABC$ and the line $PG$ are concurrent.
Let $\mathbb{N}$ denote the set of all positive integers. Find all functions $f:\mathbb{N}\to\mathbb{N}$ such that $$x^2-y^2+2y(f(x)+f(y))$$is a square of an integer for all positive integers $x$ and $y$.
Find all positive integers $d$ for which there exist polynomials $P(x)$ and $Q(x)$ with real coefficients such that degree of $P$ equals $d$ and $$P(x)^2+1=(x^2+1)Q(x)^2.$$