Navvye/Olympiad-Problems-CSV huggingface dataset:
2014 Middle European Mathematical Olympiad
For integers $n \ge k \ge 0$ we define the bibinomial coefficient $\left( \binom{n}{k} \right)$ by

$$ \left( \binom{n}{k} \right) = \frac{n!!}{k!!(n-k)!!} .$$

Determine all pairs $(n,k)$ of integers with $n \ge k \ge 0$ such that the corresponding bibinomial coefficient is an integer.



Remark: The double factorial $n!!$ is defined to be the product of all even positive integers up to $n$ if $n$ is even and the product of all odd positive integers up to $n$ if $n$ is odd. So e.g. $0!! = 1$, $4!! = 2 \cdot 4 = 8$, and $7!! = 1 \cdot 3 \cdot 5 \cdot 7 = 105$.
2014 Middle European Mathematical Olympiad
Determine the lowest possible value of the expression

$$ \frac{1}{a+x} + \frac{1}{a+y} + \frac{1}{b+x} + \frac{1}{b+y} $$

where $a,b,x,$ and $y$ are positive real numbers satisfying the inequalities

$$ \frac{1}{a+x} \ge \frac{1}{2} $$ $$\frac{1}{a+y} \ge \frac{1}{2} $$ $$ \frac{1}{b+x} \ge \frac{1}{2} $$ $$ \frac{1}{b+y} \ge 1. $$
2014 Middle European Mathematical Olympiad
Determine all functions $f : \mathbb{R} \to \mathbb{R}$ such that

$$ xf(xy) + xyf(x) \ge f(x^2)f(y) + x^2y $$

holds for all $x,y \in \mathbb{R}$.
2014 Middle European Mathematical Olympiad
Let $K$ and $L$ be positive integers. On a board consisting of $2K \times 2L$ unit squares an ant starts in the lower left corner square and walks to the upper right corner square. In each step it goes horizontally or vertically to a neighbouring square. It never visits a square twice. At the end some squares may remain unvisited.

In some cases the collection of all unvisited squares forms a single rectangle. In such cases, we call this rectangle MEMOrable.



Determine the number of different MEMOrable rectangles.



Remark: Rectangles are different unless they consist of exactly the same squares.
2014 Middle European Mathematical Olympiad
In Happy City there are $2014$ citizens called $A_1, A_2, \dots , A_{2014}$. Each of them is either happy or unhappy at any moment in time. The mood of any citizen $A$ changes (from being unhappy to being happy or vice versa) if and only if some other happy citizen smiles at $A$. On Monday morning there were $N$ happy citizens in the city.



The following happened on Monday during the day: the citizen $A_1$ smiled at citizen $A_2$, then $A_2$ smiled at $A_3$, etc., and, finally, $A_{2013}$ smiled at $A_{2014}$. Nobody smiled at anyone else apart from this. Exactly the same repeated on Tuesday, Wednesday and Thursday. There were exactly $2000$ happy citizens on Thursday evening.



Determine the largest possible value of $N$.
2014 Middle European Mathematical Olympiad
Let $ABC$ be a triangle with $AB < AC$. Its incircle with centre $I$ touches the sides $BC, CA,$ and $AB$ in the points $D, E,$ and $F$ respectively. The angle bisector $AI$ intersects the lines $DE$ and $DF$ in the points $X$ and $Y$ respectively. Let $Z$ be the foot of the altitude through $A$ with respect to $BC$.



Prove that $D$ is the incentre of the triangle $XYZ$.
2014 Middle European Mathematical Olympiad
Let the incircle $k$ of the triangle $ABC$ touch its side $BC$ at $D$. Let the line $AD$ intersect $k$ at $L \neq D$ and denote the excentre of $ABC$ opposite to $A$ by $K$. Let $M$ and $N$ be the midpoints of $BC$ and $KM$ respectively.



Prove that the points $B, C, N,$ and $L$ are concyclic.
2014 Middle European Mathematical Olympiad
A finite set of positive integers $A$ is called meanly if for each of its nonempy subsets the arithmetic mean of its elements is also a positive integer. In other words, $A$ is meanly if $\frac{1}{k}(a_1 + \dots + a_k)$ is an integer whenever $k \ge 1$ and $a_1, \dots, a_k \in A$ are distinct.



Given a positive integer $n$, determine the least possible sum of the elements of a meanly $n$-element set.
2014 Middle European Mathematical Olympiad
Determine all quadruples $(x,y,z,t)$ of positive integers such that

$$ 20^x + 14^{2y} = (x + 2y + z)^{zt}.$$
2013 Middle European Mathematical Olympiad
Let $ a, b, c$ be positive real numbers such that

$$ a+b+c=\frac{1}{a^2} + \frac{1}{b^2} + \frac{1}{c^2}  . $$

Prove that

$$ 2(a+b+c) \ge \sqrt[3]{7 a^2 b +1 } + \sqrt[3]{7 b^2 c +1 } + \sqrt[3]{7 c^2 a +1 } . $$

Find all triples $ (a,b,c) $ for which equality holds.
2013 Middle European Mathematical Olympiad
Let $n$ be a positive integer. On a board consisting of $4n \times 4n$ squares, exactly $4n$ tokens are placed so that each row and each column contains one token. In a step, a token is moved horizontally of vertically to a neighbouring square. Several tokens may occupy the same square at the same time. The tokens are to be moved to occupy all the squares of one of the two diagonals.

Determine the smallest number $k(n)$ such that for any initial situation, we can do it in at most $k(n)$ steps.
2013 Middle European Mathematical Olympiad
Let $ABC$ be an isosceles triangle with $AC=BC$. Let $N$ be a point inside the triangle such that $2 \angle ANB = 180 ^\circ + \angle ACB $. Let $ D $ be the intersection of the line $BN$ and the line parallel to $AN$ that passes through $C$. Let $P$ be the intersection of the angle bisectors of the angles $CAN$ and $ABN$. Show that the lines $DP$ and $AN$ are perpendicular.
2013 Middle European Mathematical Olympiad
Let $ a$ and $b$ be positive integers. Prove that there exist positive integers $ x $ and $ y $ such that

$$ \binom{x+y}{2} = ax + by . $$
2013 Middle European Mathematical Olympiad
Find all functions $ f : \mathbb{R} \rightarrow \mathbb{R} $ such that

$$ f( xf(x) + 2y) = f(x^2)+f(y)+x+y-1 $$

holds for all $ x, y \in \mathbb{R}$.
2013 Middle European Mathematical Olympiad
Let $ x, y, z, w $ be nonzero real numbers such that $ x+y \ne 0$, $ z+w \ne 0 $, and $ xy+zw \ge 0 $. Prove that

$$  \left( \frac{x+y}{z+w} + \frac{z+w}{x+y} \right) ^{-1} + \frac{1}{2} \ge \left( \frac{x}{z} + \frac{z}{x} \right) ^{-1} + \left( \frac{y}{w} + \frac{w}{y} \right) ^{-1}$$
2013 Middle European Mathematical Olympiad
There are $n \ge 2$ houses on the northern side of a street. Going from the west to the east, the houses are numbered from 1 to $n$. The number of each house is shown on a plate. One day the inhabitants of the street make fun of the postman by shuffling their number plates in the following way: for each pair of neighbouring houses, the currnet number plates are swapped exactly once during the day.

How many different sequences of number plates are possible at the end of the day?
2013 Middle European Mathematical Olympiad
Consider finitely many points in the plane with no three points on a line. All these points can be coloured red or green such that any triangle with vertices of the same colour contains at least one point of the other colour in its interior.

What is the maximal possible number of points with this property?
2013 Middle European Mathematical Olympiad
Let $ABC$ be and acute triangle. Construct a triangle $PQR$ such that $ AB = 2PQ $, $ BC = 2QR $, $ CA = 2 RP $, and the lines $ PQ, QR,$ and $RP$ pass through the points $ A, B , $ and $ C $, respectively. (All six points $ A, B, C, P, Q, $ and $ R $ are distinct.)
2013 Middle European Mathematical Olympiad
Let $K$ be a point inside an acute triangle $ ABC $, such that $ BC $ is a common tangent of the circumcircles of $ AKB $ and $ AKC$. Let $ D $ be the intersection of the lines $ CK $ and $ AB $, and let $ E $ be the intersection of the lines $ BK $ and $ AC $ . Let $ F $ be the intersection of the line $BC$ and the perpendicular bisector of the segment $DE$. The circumcircle of $ABC$ and the circle $k$ with centre $ F$ and radius $FD$ intersect at points $P$ and $Q$.

Prove that the segment $PQ$ is a diameter of $k$.
2013 Middle European Mathematical Olympiad
The numbers from 1 to $ 2013^2 $ are written row by row into a table consisting of $ 2013 \times 2013 $ cells. Afterwards, all columns and all rows containing at least one of the perfect squares $ 1, 4, 9, \cdots, 2013^2 $ are simultaneously deleted.

How many cells remain?
2013 Middle European Mathematical Olympiad
The expression

$$ \pm \Box \pm \Box \pm \Box \pm \Box \pm \Box \pm \Box $$is written on the blackboard. Two players, $ A $ and $ B $, play a game, taking turns. Player $ A $ takes the first turn. In each turn, the player on turn replaces a symbol $ \Box $ by a positive integer. After all the symbols $\Box$ are replace, player $A$ replaces each of the signs $\pm$ by either + or -, independently of each other. Player $ A $ wins if the value of the expression on the blackboard is not divisible by any of the numbers $ 11, 12, \cdots, 18 $. Otherwise, player $ B$ wins. Determine which player has a winning strategy.
2012 Middle European Mathematical Olympiad
Let $ \mathbb{R} ^{+} $ denote the set of all positive real numbers. Find all functions  $ \mathbb{R} ^{+} \to \mathbb{R} ^{+} $ such that

$$ f(x+f(y)) = yf(xy+1)$$

holds for all $ x, y \in \mathbb{R} ^{+} $.
2012 Middle European Mathematical Olympiad
Let $ N $ be a positive integer. A set $ S \subset \{ 1, 2, \cdots, N \} $ is called allowed if it does not contain three distinct elements $ a, b, c $ such that $ a $ divides $ b $ and $ b $ divides $c$. Determine the largest possible number of elements in an allowed set $ S $.
2012 Middle European Mathematical Olympiad
In a given trapezium $ ABCD $ with $ AB$ parallel to $ CD $ and $ AB > CD $, the line $ BD $ bisects the angle $ \angle ADC $. The line through $ C $ parallel to $ AD $ meets the segments $ BD $ and $ AB $ in $ E $ and $ F $, respectively. Let $ O $ be the circumcenter of the triangle $ BEF $. Suppose that $ \angle ACO = 60^{\circ} $. Prove the equality

$$ CF = AF + FO .$$
2012 Middle European Mathematical Olympiad
The sequence $ \{ a_n \} _ { n \ge 0 } $ is defined by $ a_0 = 2 , a_1 = 4 $ and

$$ a_{n+1} = \frac{a_n a_{n-1}}{2} + a_n + a_{n-1} $$

for all positive integers $ n $. Determine all prime numbers $ p $ for which there exists a positive integer $ m $ such that $ p $ divides the number $ a_m - 1 $.
2012 Middle European Mathematical Olympiad
Find all triplets $ (x,y,z) $ of real numbers such that

$$ 2x^3 + 1 = 3zx $$$$ 2y^3 + 1 = 3xy $$$$ 2z^3 + 1 =  3yz $$
2012 Middle European Mathematical Olympiad
Let $ a,b$ and $ c $ be positive real numbers with $ abc = 1 $. Prove that

$$ \sqrt{ 9 + 16a^2}+\sqrt{ 9 + 16b^2}+\sqrt{ 9 + 16c^2} \ge 3 +4(a+b+c)$$
2012 Middle European Mathematical Olympiad
Let $ n $ be a positive integer. Consider words of length $n$ composed of letters from the set $ \{ M, E, O \} $. Let $ a $ be the number of such words containing an even number (possibly 0) of blocks $ ME $ and an even number (possibly 0) blocks of $ MO $ . Similarly let $ b $ the number of such words containing an odd number of blocks $ ME $ and an odd number of blocks $ MO $. Prove that $ a>b $.
2012 Middle European Mathematical Olympiad
Let $ p>2 $ be a prime number. For any permutation $ \pi = ( \pi(1) , \pi(2) , \cdots , \pi(p) ) $ of the set $ S = \{ 1, 2, \cdots , p \} $, let $ f( \pi ) $ denote the number of multiples of $ p $ among the following $ p $ numbers:

$$ \pi(1) , \pi(1) + \pi(2) , \cdots , \pi(1) + \pi(2) + \cdots + \pi(p)  $$

Determine the average value of $ f( \pi) $ taken over all permutations $ \pi $ of $ S $.
2012 Middle European Mathematical Olympiad
Let $ K $ be the midpoint of the side $ AB $ of a given triangle $ ABC $. Let $ L $ and $ M$ be points on the sides $ AC $ and $ BC$, respectively, such that $ \angle CLK = \angle KMC $. Prove that the perpendiculars to the sides $ AB, AC, $ and $ BC $ passing through $ K,L, $ and $M$, respectively, are concurrent.
2012 Middle European Mathematical Olympiad
Let $ ABCD $ be a convex quadrilateral with no pair of parallel sides, such that $ \angle ABC  = \angle CDA $. Assume that the intersections of the pairs of neighbouring angle bisectors of $ ABCD $ form a convex quadrilateral $ EFGH $. Let $ K $ be the intersection of the diagonals of $ EFGH$. Prove that the lines $ AB $ and $ CD $ intersect on the circumcircle of the triangle $ BKD $.
2012 Middle European Mathematical Olympiad
Find all triplets $ (x,y,z) $ of positive integers such that

$$ x^y + y^x = z^y $$$$ x^y + 2012 = y^{z+1} $$
2012 Middle European Mathematical Olympiad
For any positive integer $n $ let $ d(n) $ denote the number of positive divisors of $ n $. Do there exist positive integers $ a $ and $b $, such that $ d(a)=d(b)$ and $ d(a^2 ) = d(b^2 ) $, but $ d(a^3 ) \ne d(b^3 ) $ ?
2011 Middle European Mathematical Olympiad
Initially, only the integer $44$ is written on a board. An integer a on the board can be re- placed with four pairwise different integers $a_1, a_2, a_3, a_4$ such that the arithmetic mean $\frac 14 (a_1 + a_2 + a_3 + a_4)$ of the four new integers is equal to the number $a$. In a step we simultaneously replace all the integers on the board in the above way. After $30$ steps we end up with $n = 4^{30}$ integers $b_1, b2,\ldots, b_n$ on the board. Prove that

$$\frac{b_1^2 + b_2^2+b_3^2+\cdots+b_n^2}{n}\geq 2011.$$
2011 Middle European Mathematical Olympiad
Let $n \geq 3$ be an integer. John and Mary play the following game: First John labels the sides of a regular $n$-gon with the numbers $1, 2,\ldots, n$ in whatever order he wants, using each number exactly once. Then Mary divides this $n$-gon into triangles by drawing $n-3$ diagonals which do not intersect each other inside the $n$-gon. All these diagonals are labeled with number $1$. Into each of the triangles the product of the numbers on its sides is written. Let S be the sum of those $n - 2$ products.



Determine the value of $S$ if Mary wants the number $S$ to be as small as possible and John wants $S$ to be as large as possible and if they both make the best possible choices.
2011 Middle European Mathematical Olympiad
In a plane the circles $\mathcal K_1$ and $\mathcal K_2$ with centers $I_1$ and $I_2$, respectively, intersect in two points $A$ and $B$. Assume that $\angle I_1AI_2$ is obtuse. The tangent to $\mathcal K_1$ in $A$ intersects $\mathcal K_2$ again in $C$ and the tangent to $\mathcal K_2$ in $A$ intersects $\mathcal K_1$ again in $D$. Let $\mathcal K_3$ be the circumcircle of the triangle $BCD$. Let $E$ be the midpoint of that arc $CD$ of $\mathcal K_3$ that contains $B$. The lines $AC$ and $AD$ intersect $\mathcal K_3$ again in $K$ and $L$, respectively. Prove that the line $AE$ is perpendicular to $KL$.
2011 Middle European Mathematical Olympiad
Let $k$ and $m$, with $k > m$, be positive integers such that the number $km(k^2 - m^2)$ is divisible by $k^3 - m^3$. Prove that $(k - m)^3 > 3km$.
2011 Middle European Mathematical Olympiad
Find all functions $f : \mathbb R \to \mathbb R$ such that the equality

$$y^2f(x) + x^2f(y) + xy = xyf(x + y) + x^2 + y^2$$

holds for all $x, y \in \Bbb R$, where $\Bbb R$ is the set of real numbers.
2011 Middle European Mathematical Olympiad
Let $a, b, c$ be positive real numbers such that

$$\frac{a}{1+a}+\frac{b}{1+b}+\frac{c}{1+c}=2.$$

Prove that

$$\frac{\sqrt a + \sqrt b+\sqrt c}{2} \geq \frac{1}{\sqrt a}+\frac{1}{\sqrt b}+\frac{1}{\sqrt c}.$$
2011 Middle European Mathematical Olympiad
For an integer $n \geq 3$, let $\mathcal M$ be the set $\{(x, y) | x, y \in \mathbb Z, 1 \leq  x \leq  n, 1 \leq  y \leq  n\}$ of points in the plane.



What is the maximum possible number of points in a subset $S \subseteq \mathcal M$ which does not contain three distinct points being the vertices of a right triangle?
2011 Middle European Mathematical Olympiad
Let $n \geq 3$ be an integer. At a MEMO-like competition, there are $3n$ participants, there are n languages spoken, and each participant speaks exactly three different languages. Prove that at least $\left\lceil\frac{2n}{9}\right\rceil$ of the spoken languages can be chosen in such a way that no participant speaks more than two of the chosen languages.



Note. $\lceil x\rceil$ is the smallest integer which is greater than or equal to $x$.
2011 Middle European Mathematical Olympiad
Let $ABCDE$ be a convex pentagon with all five sides equal in length. The diagonals $AD$ and $EC$ meet in $S$ with $\angle ASE = 60^\circ$. Prove that $ABCDE$ has a pair of parallel sides.
2011 Middle European Mathematical Olympiad
Let $ABC$ be an acute triangle. Denote by $B_0$ and $C_0$ the feet of the altitudes from vertices $B$ and $C$, respectively. Let $X$ be a point inside the triangle $ABC$ such that the line $BX$ is tangent to the circumcircle of the triangle $AXC_0$ and the line $CX$ is tangent to the circumcircle of the triangle $AXB_0$. Show that the line $AX$ is perpendicular to $BC$.
2011 Middle European Mathematical Olympiad
Let $A$ and $B$ be disjoint nonempty sets with $A \cup  B = \{1, 2,3, \ldots, 10\}$. Show that there exist elements $a \in A$ and $b \in B$ such that the number $a^3 + ab^2 + b^3$ is divisible by $11$.
2011 Middle European Mathematical Olympiad
We call a positive integer $n$ amazing if there exist positive integers $a, b, c$ such that the equality

$$n = (b, c)(a, bc) + (c, a)(b, ca) + (a, b)(c, ab)$$

holds. Prove that there exist $2011$ consecutive positive integers which are amazing.



Note. By $(m, n)$ we denote the greatest common divisor of positive integers $m$ and $n$.
2010 Middle European Mathematical Olympiad
Find all functions $f:\mathbb{R}\to\mathbb{R}$ such that for all $x, y\in\mathbb{R}$, we have

$$f(x+y)+f(x)f(y)=f(xy)+(y+1)f(x)+(x+1)f(y).$$
2010 Middle European Mathematical Olympiad
All positive divisors of a positive integer $N$ are written on a blackboard. Two players $A$ and $B$ play the following game taking alternate moves. In the firt move, the player $A$ erases $N$. If the last erased number is $d$, then the next player erases either a divisor of $d$ or a multiple of $d$. The player who cannot make a move loses. Determine all numbers $N$ for which $A$ can win independently of the moves of $B$.



(4th Middle European Mathematical Olympiad, Individual Competition, Problem 2)
2010 Middle European Mathematical Olympiad
We are given a cyclic quadrilateral $ABCD$ with a point $E$ on the diagonal $AC$ such that $AD=AE$ and $CB=CE$. Let $M$ be the center of the circumcircle $k$ of the triangle $BDE$. The circle $k$ intersects the line $AC$ in the points $E$ and $F$. Prove that the lines $FM$, $AD$ and $BC$ meet at one point.





(4th Middle European Mathematical Olympiad, Individual Competition, Problem 3)
2010 Middle European Mathematical Olympiad
Find all positive integers $n$ which satisfy the following tow conditions:

(a) $n$ has at least four different positive divisors;

(b) for any divisors $a$ and $b$ of $n$ satisfying $1<a<b<n$, the number $b-a$ divides $n$.



(4th Middle European Mathematical Olympiad, Individual Competition, Problem 4)
2010 Middle European Mathematical Olympiad
Three strictly increasing sequences

$$a_1, a_2, a_3, \ldots,\qquad b_1, b_2, b_3, \ldots,\qquad c_1, c_2, c_3, \ldots$$

of positive integers are given. Every positive integer belongs to exactly one of the three sequences. For every positive integer $n$, the following conditions hold:

(a) $c_{a_n}=b_n+1$;

(b) $a_{n+1}>b_n$;

(c) the number $c_{n+1}c_{n}-(n+1)c_{n+1}-nc_n$ is even.

Find $a_{2010}$, $b_{2010}$ and $c_{2010}$.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 1)
2010 Middle European Mathematical Olympiad
For each integer $n\geqslant2$, determine the largest real constant $C_n$ such that for all positive real numbers $a_1, \ldots, a_n$ we have

$$\frac{a_1^2+\ldots+a_n^2}{n}\geqslant\left(\frac{a_1+\ldots+a_n}{n}\right)^2+C_n\cdot(a_1-a_n)^2\mbox{.}$$



(4th Middle European Mathematical Olympiad, Team Competition, Problem 2)
2010 Middle European Mathematical Olympiad
In each vertex of a regular $n$-gon, there is a fortress.  At the same moment, each fortress shoots one of the two nearest fortresses and hits it. The result of the shooting is the set of the hit fortresses; we do not distinguish whether a fortress was hit once or twice. Let $P(n)$ be the number of possible results of the shooting. Prove that for every positive integer $k\geqslant 3$, $P(k)$ and $P(k+1)$ are relatively prime.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 3)
2010 Middle European Mathematical Olympiad
Let $n$ be a positive integer. A square $ABCD$ is partitioned into $n^2$ unit squares. Each of them is divided into two triangles by the diagonal parallel to $BD$. Some of the vertices of the unit squares are colored red in such a way that each of these $2n^2$ triangles contains at least one red vertex. Find the least number of red vertices.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 4)
2010 Middle European Mathematical Olympiad
The incircle of the triangle $ABC$ touches the sides $BC$, $CA$, and $AB$ in the points $D$, $E$ and $F$, respectively. Let $K$ be the point symmetric to $D$ with respect to the incenter. The lines $DE$ and $FK$ intersect at $S$. Prove that $AS$ is parallel to $BC$.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 5)
2010 Middle European Mathematical Olympiad
Let $A$, $B$, $C$, $D$, $E$ be points such that $ABCD$ is a cyclic quadrilateral and $ABDE$ is a parallelogram. The diagonals $AC$ and $BD$ intersect at $S$ and the rays $AB$ and $DC$ intersect at $F$. Prove that $\sphericalangle{AFS}=\sphericalangle{ECD}$.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 6)
2010 Middle European Mathematical Olympiad
For a nonnegative integer $n$, define $a_n$ to be the positive integer with decimal representation

$$1\underbrace{0\ldots0}_{n}2\underbrace{0\ldots0}_{n}2\underbrace{0\ldots0}_{n}1\mbox{.}$$

Prove that $\frac{a_n}{3}$ is always the sum of two positive perfect cubes but never the sum of two perfect squares.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 7)
2010 Middle European Mathematical Olympiad
We are given a positive integer $n$ which is not a power of two. Show that ther exists a positive integer $m$ with the following two properties:

(a) $m$ is the product of two consecutive positive integers;

(b) the decimal representation of $m$ consists of two identical blocks with $n$ digits.



(4th Middle European Mathematical Olympiad, Team Competition, Problem 8)
2009 Middle European Mathematical Olympiad
Find all functions $ f: \mathbb{R} \to \mathbb{R}$, such that

$$ f(xf(y)) + f(f(x) + f(y)) = yf(x) + f(x + f(y))$$

holds for all $ x$, $ y \in \mathbb{R}$, where $ \mathbb{R}$ denotes the set of real numbers.
2009 Middle European Mathematical Olympiad
Suppose that we have $ n \ge 3$ distinct colours. Let $ f(n)$ be the greatest integer with the property that every side and every diagonal of a convex polygon with $ f(n)$ vertices can be coloured with one of $ n$ colours in the following way:



(i) At least two colours are used,



(ii) any three vertices of the polygon determine either three segments of the same colour or of three different colours.



Show that $ f(n) \le (n-1)^2$ with equality for infintely many values of $ n$.
2009 Middle European Mathematical Olympiad
Let $ ABCD$ be a convex quadrilateral such that $ AB$ and $ CD$ are not parallel and $ AB=CD$. The midpoints of the diagonals $ AC$ and $ BD$ are $ E$ and $ F$, respectively. The line $ EF$ meets segments $ AB$ and $ CD$ at $ G$ and $ H$, respectively. Show that $ \angle AGH = \angle DHG$.
2009 Middle European Mathematical Olympiad
Determine all integers $ k\ge 2$ such that for all pairs $ (m$, $ n)$ of different positive integers not greater than $ k$, the number $ n^{n-1}-m^{m-1}$ is not divisible by $ k$.
2009 Middle European Mathematical Olympiad
Let $ x$, $ y$, $ z$ be real numbers satisfying $ x^2+y^2+z^2+9=4(x+y+z)$. Prove that

$$ x^4+y^4+z^4+16(x^2+y^2+z^2) \ge 8(x^3+y^3+z^3)+27$$

and determine when equality holds.
2009 Middle European Mathematical Olympiad
Let $ a$, $ b$, $ c$ be real numbers such that for every two of the equations

$$ x^2+ax+b=0, \quad x^2+bx+c=0, \quad x^2+cx+a=0$$

there is exactly one real number satisfying both of them. Determine all possible values of $ a^2+b^2+c^2$.