In a classroom there are $m$ students. During the month of July each of them visited the library at least once but none of them visited the library twice in the same day. It turned out that during the month of July each student visited the library a different number of times, furthermore for any two students $A$ and $B$ there was a day in which $A$ visited the library and $B$ did not and there was also a day when $B$ visited the library and $A$ did not do so. Determine the largest possible value of $m$.
2020 Peru Iberoamerican Team Selection Test
Day 1
Find all functions $f : \mathbb{Z} \to \mathbb{Z}$ that satisfy the conditions: $i) f(f(x)) = xf(x) - x^2 + 2,\forall x\in\mathbb{Z}$ $ii) f$ takes all integer values
Let $ABC$ be an acute triangle with $| AB | > | AC |$. Let $D$ be the foot of the altitude from $A$ to $BC$, let $K$ be the intersection of $AD$ with the internal bisector of angle $B$, Let $M$ be the foot of the perpendicular from $B$ to $CK$ (it could be in the extension of segment $CK$) and$ N$ the intersection of $BM$ and $AK$ (it could be in the extension of the segments). Let $T$ be the intersection of$ AC$ with the line that passes through $N$ and parallel to $DM$. Prove that $BM$ is the internal bisector of the angle $\angle TBC$
Find all odd integers $n$ for which $\frac{2^{\phi (n)}-1}{n}$ is a perfect square.
Day 2
Is it possible to cover the plane with (infinite) circles so that exactly $2020$ circles pass through each point on the plane?
Find all functions $f : \mathbb{Z}\to \mathbb{Z}$ that satisfy: $i) f(f(x))=x, \forall x\in\mathbb{Z}$ $ii)$ For any integer $x$ and $y$ such that $x + y$ is odd, it holds that $f(x) + f(y) \ge x + y.$
The numbers $1, 2,\ldots ,50$ are written on a blackboard. Ana performs the following operations: she chooses any three numbers $a, b$ and $c$ from the board and replaces them with their sum $a + b + c$ and writes the number $(a + b) (b + c) (c + a)$ in the notebook. Ana performs these operations until there are only two numbers left on the board ($24$ operations in total). Then, she calculates the sum of the numbers written down in her notebook. Let $M$ and $m$ be the maximum and minimum possible of the sums obtained by Ana. Find the value of $\frac{M}{m}$.