## [Solutions] The Mathematical Danube Competition 2017

1. Find all polynomials with interger coefficients such that $$a^2+b^2-c^2 \mid P(a)+P(b)-P(c)$$ for all intergers $a$, $b$, $c$.
2. Let $n$ be a positive interger. Let $n$ real numbers be wrote on a paper. We call a "transformation" choosing $2$ numbers $a$, $b$ and replace both of them with $a\times b$. Find all $n$ for which after a finite number of transformations and any $n$ real numbers, we can have the same number written $n$ times on the paper.
3. Let $O$, $H$ be the circumcenter and the orthocenter of triangle $ABC$. Let $F$ be the foot of the perpendicular from $C$ onto $AB$, and $M$ the midpoint of $CH$. Let $N$ be the foot of the perpendicular from $C$ onto the parallel through $H$ at $OM$. Let $D$ be on $AB$ such that $CA=CD$. Let $BN$ intersect $CD$ at $P$. Let $PH$ intersect $CA$ at $Q$. Prove that $QF\perp OF$.
4. Let us have an infinite grid of unit squares. We write in every unit square a real number, such that the absolute value of the sum of the numbers from any $n\times n$ square is less or equal than $1$. Prove that the absolute value of the sum of the numbers from any $m\times n$ rectangular is less or equal than $4$.