A finite set $M$ of real numbers has the following properties: $M$ has at least $4$ elements, and there exists a bijective function $f:M\to M$, different from the identity, such that $ab\leq f(a)f(b)$ for all $a\neq b\in M.$ Prove that the sum of the elements of $M$ is $0.$
2022 Romania EGMO TST
Day 1
At first, on a board, the number $1$ is written $100$ times. Every minute, we pick a number $a$ from the board, erase it, and write $a/3$ thrice instead. We say that a positive integer $n$ is persistent if after any amount of time, regardless of the numbers we pick, we can find at least $n$ equal numbers on the board. Find the greatest persistent number.
Let $ABCD$ be a convex quadrilateral and let $O$ be the intersection of its diagonals. Let $P,Q,R,$ and $S$ be the projections of $O$ on $AB,BC,CD,$ and $DA$ respectively. Prove that \[2(OP+OQ+OR+OS)\leq AB+BC+CD+DA.\]
For every positive integer $N\geq 2$ with prime factorisation $N=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$ we define \[f(N):=1+p_1a_1+p_2a_2+\cdots+p_ka_k.\]Let $x_0\geq 2$ be a positive integer. We define the sequence $x_{n+1}=f(x_n)$ for all $n\geq 0.$ Prove that this sequence is eventually periodic and determine its fundamental period.
Day 2
Determine all functions $f:\mathbb{R}\to\mathbb{R}$ such that all real numbers $x$ and $y$ satisfy \[f(f(x)+y)=f(x^2-y)+4f(x)y.\]
On a board there is a regular polygon $A_1A_2\ldots A_{99}.$ Ana and Barbu alternatively occupy empty vertices of the polygon and write down triangles on a list: Ana only writes obtuse triangles, while Barbu only writes acute ones. At the first turn, Ana chooses three vertices $X,Y$ and $Z$ and writes down $\triangle XYZ.$ Then, Barbu chooses two of $X,Y$ and $Z,$ for example $X$ and $Y$, and an unchosen vertex $T$, and writes down $\triangle XYT.$ The game goes on and at each turn, the player must choose a new vertex $R$ and write down $\triangle PQR$, where $P$ is the last vertex chosen by the other player, and $Q$ is one of the other vertices of the last triangle written down by the other player. If one player cannot perform a move, then the other one wins. If both people play optimally, determine who has a winning strategy.
Let be given a parallelogram $ ABCD$ and two points $ A_1$, $ C_1$ on its sides $ AB$, $ BC$, respectively. Lines $ AC_1$ and $ CA_1$ meet at $ P$. Assume that the circumcircles of triangles $ AA_1P$ and $ CC_1P$ intersect at the second point $ Q$ inside triangle $ ACD$. Prove that $ \angle PDA = \angle QBA$.
Let $p\geq 3$ be an odd positive integer. Show that $p$ is prime if and only if however we choose $(p+1)/2$ pairwise distinct positive integers, we can find two of them, $a$ and $b$, such that $(a+b)/\gcd(a,b)\geq p.$