Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a function such that $$\displaystyle{f(f(x)) = \frac{x^2 - x}{2}\cdot f(x) + 2-x,}$$for all $x \in \mathbb{R}.$ Find all possible values of $f(2).$
2012 Peru IMO TST
day 1
Let $a, b, c$ be the lengths of the sides of a triangle, and $h_a, h_b, h_c$ the lengths of the heights corresponding to the sides $a, b, c,$ respectively. If $t \geq \frac{1} {2}$ is a real number, show that there is a triangle with sidelengths $$ t\cdot a + h_a, \ t\cdot b + h_b , \ t\cdot c + h_c.$$
Suppose that $1000$ students are standing in a circle. Prove that there exists an integer $k$ with $100 \leq k \leq 300$ such that in this circle there exists a contiguous group of $2k$ students, for which the first half contains the same number of girls as the second half. Proposed by Gerhard Wöginger, Austria
day 2
An infinite triangular lattice is given, such that the distance between any two adjacent points is always equal to $1$. Points $A$, $B$, and $C$ are chosen on the lattice such that they are the vertices of an equilateral triangle of side length $L$, and the sides of $ABC$ contain no points from the lattice. Prove that, inside triangle $ABC$, there are exactly $\frac{L^2-1}{2}$ points from the lattice.
Let $ABCD$ be a parallelogram such that $\angle{ABC} > 90^{\circ}$, and $\mathcal{L}$ the line perpendicular to $BC$ that passes through $B$. Suppose that the segment $CD$ does not intersect $\mathcal{L}$. Of all the circumferences that pass through $C$ and $D$, there is one that is tangent to $\mathcal{L}$ at $P$, and there is another one that is tangent to $\mathcal{L}$ at $Q$ (where $P \neq Q$). If $M$ is the midpoint of $AB$, prove that $\angle{PMD} = \angle{QMD}$.
Let $p$ be an odd prime number. For every integer $a,$ define the number $S_a = \sum^{p-1}_{j=1} \frac{a^j}{j}.$ Let $m,n \in \mathbb{Z},$ such that $S_3 + S_4 - 3S_2 = \frac{m}{n}.$ Prove that $p$ divides $m.$ Proposed by Romeo Meštrović, Montenegro