Prove that it is impossible to divide a square with side length $7$ into exactly $36$ squares with integer side lengths.
2022 Ecuador NMO (OMEC)
Day 1
Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all real numbers $x, y$ \[f(x + y)=f(f(x)) + y + 2022\]
A polygon is gridded if the internal angles of the polygon are either $90$ or $270$, it has integer side lengths and its sides don't intersect with each other. Prove that for all $n \ge 8$, it exist a gridded polygon with area $2n$ and perimeter $2n$.
Day 2
Find the number of sets with $10$ distinct positive integers such that the average of its elements is less than 6.
Let $ABC$ be a 90-degree triangle with hypotenuse $BC$. Let $D$ and $E$ distinct points on segment $BC$ and $P, Q$ be the foot of the perpendicular from $D$ to $AB$ and $E$ to $AC$, respectively. $DP$ and $EQ$ intersect at $R$. Lines $CR$ and $AB$ intersect at $M$ and lines $BR$ and $AC$ intersect at $N$. Prove that $MN \parallel BC$ if and only if $BD=CE$.
Prove that for all prime $p \ge 5$, there exist an odd prime $q \not= p$ such that $q$ divides $(p-1)^p + 1$