{"year": "2018", "tier": "T1", "problem_label": "1", "problem_type": null, "exam": "APMO", "problem": "Let $H$ be the orthocenter of the triangle $A B C$. Let $M$ and $N$ be the midpoints of the sides $A B$ and $A C$, respectively. Assume that $H$ lies inside the quadrilateral $B M N C$ and that the circumcircles of triangles $B M H$ and $C N H$ are tangent to each other. The line through $H$ parallel to $B C$ intersects the circumcircles of the triangles $B M H$ and $C N H$ in the points $K$ and $L$, respectively. Let $F$ be the intersection point of $M K$ and $N L$ and let $J$ be the incenter of triangle $M H N$. Prove that $F J=F A$.", "solution": "Lemma 1. In a triangle $A B C$, let $D$ be the intersection of the interior angle bisector at $A$ with the circumcircle of $A B C$, and let $I$ be the incenter of $\\triangle A B C$. Then\n\n$$\nD I=D B=D C\n$$\n\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-1.jpg?height=637&width=618&top_left_y=938&top_left_x=725)\n\nProof.\n\n$$\n\\angle D B I=\\frac{\\angle B A C}{2}+\\frac{\\widehat{B}}{2}=\\angle D I B \\quad \\Rightarrow \\quad D I=D B\n$$\n\nAnalogously $D I=D C$.\nWe start solving the problem. First we state some position considerations. Since there is an arc of the circumcircle of $B H M$ outside the triangle $A B C$, it must happen that $K$ and $N$ lie on opposite sides of $A M$. Similarly, $L$ and $M$ lie on opposite sides of $A N$. Also, $K$ and $L$ lie on the same side of $M N$, and opposite to $A$. Therefore, $F$ lies inside the triangle $A M N$.\n\nNow, since $H$ is the orthocenter of $\\triangle A B C$ and the circumcircles of $B M H$ and $C N H$ are tangent we have\n\n$$\n\\angle A B H=90^{\\circ}-\\angle B A C=\\angle A C H \\quad \\Rightarrow \\quad \\angle M H N=\\angle M B H+\\angle N C H=180^{\\circ}-2 \\angle B A C .\n$$\n\nSo $\\angle M B H=\\angle M K H=\\angle N C H=\\angle N L H=90^{\\circ}-\\angle B A C$ and, since $M N \\| K L$, we have\n\n$$\n\\angle F M N=\\angle F N M=90^{\\circ}-\\angle B A C \\Rightarrow \\angle M F N=2 \\angle B A C .\n$$\n\nThe relations (1) and (2) yield that the quadrilateral $M F N H$ is cyclic, with the vertices in this order around the circumference. Since $F M=F N, \\angle M F N=2 \\angle B A C$ and $F$ is the correct side of $M N$ we have that the point $F$ is the circumcenter of triangle $A M N$, and thus $F A=F M=F N$.\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-2.jpg?height=801&width=1029&top_left_y=179&top_left_x=519)\n\nSince the quadrilateral $M F N H$ is cyclic, $F M=F N$ and $H$ lies on the correct side of $M N$, we have that $H, J$ and $F$ are collinear. According to Lemma $1, F J=F M=F N$. So $F J=F A$.", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 1.", "solution_match": "# Solution."}} {"year": "2018", "tier": "T1", "problem_label": "1", "problem_type": null, "exam": "APMO", "problem": "Let $H$ be the orthocenter of the triangle $A B C$. Let $M$ and $N$ be the midpoints of the sides $A B$ and $A C$, respectively. Assume that $H$ lies inside the quadrilateral $B M N C$ and that the circumcircles of triangles $B M H$ and $C N H$ are tangent to each other. The line through $H$ parallel to $B C$ intersects the circumcircles of the triangles $B M H$ and $C N H$ in the points $K$ and $L$, respectively. Let $F$ be the intersection point of $M K$ and $N L$ and let $J$ be the incenter of triangle $M H N$. Prove that $F J=F A$.", "solution": ": According to Solution 1, we have $\\angle M H N=180^{\\circ}-2 \\angle B A C$ and since the point $J$ is the incenter of $\\triangle M H N$, we have $\\angle M J N=90^{\\circ}+\\frac{1}{2} \\angle M H N=180^{\\circ}-\\angle B A C$. So the quadrilateral $A M J N$ is cyclic.\n\nAccording to Solution 1, the point $F$ is the circumcenter of $\\triangle A M N$. So $F J=F A$.", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 1.", "solution_match": "\nSolution 2"}} {"year": "2018", "tier": "T1", "problem_label": "2", "problem_type": null, "exam": "APMO", "problem": "Let $f(x)$ and $g(x)$ be given by\n\n$$\nf(x)=\\frac{1}{x}+\\frac{1}{x-2}+\\frac{1}{x-4}+\\cdots+\\frac{1}{x-2018}\n$$\n\nand\n\n$$\ng(x)=\\frac{1}{x-1}+\\frac{1}{x-3}+\\frac{1}{x-5}+\\cdots+\\frac{1}{x-2017} .\n$$\n\nProve that\n\n$$\n|f(x)-g(x)|>2\n$$\n\nfor any non-integer real number $x$ satisfying $02$ whenever $2 n-10+0=0\n$$\n\nHence it suffices to prove $d(x)>2$ for $1$ $\\frac{1}{x-2 i}$ for $i=2,3, \\ldots, 1008$. We also have $\\frac{1}{x-2018}<0$. Hence it suffices to prove the following\nfor $12 \\\\\n\\Leftrightarrow & \\left(\\frac{1}{x-1}+\\frac{1}{2-x}\\right)+\\left(\\frac{1}{x-3}-\\frac{1}{x}\\right)>2 \\\\\n\\Leftrightarrow & \\frac{1}{(x-1)(2-x)}+\\frac{3}{x(x-3)}>2 .\n\\end{aligned}\n$$\n\nBy the $G M-H M$ inequality (alternatively, by considering the maximum of the quadratic $(x-1)(2-x))$ we have\n\n$$\n\\frac{1}{x-1} \\cdot \\frac{1}{2-x}>\\left(\\frac{2}{(x-1)+(2-x)}\\right)^{2}=4\n$$\n\nTo find a lower bound for $\\frac{3}{x(x-3)}$, note that $x(x-3)<0$ for $1-\\frac{3}{2}$.\n\nIt follows that $d(x)>4-\\frac{3}{2}>2$, as desired.", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 2.", "solution_match": "\nSolution 1"}} {"year": "2018", "tier": "T1", "problem_label": "2", "problem_type": null, "exam": "APMO", "problem": "Let $f(x)$ and $g(x)$ be given by\n\n$$\nf(x)=\\frac{1}{x}+\\frac{1}{x-2}+\\frac{1}{x-4}+\\cdots+\\frac{1}{x-2018}\n$$\n\nand\n\n$$\ng(x)=\\frac{1}{x-1}+\\frac{1}{x-3}+\\frac{1}{x-5}+\\cdots+\\frac{1}{x-2017} .\n$$\n\nProve that\n\n$$\n|f(x)-g(x)|>2\n$$\n\nfor any non-integer real number $x$ satisfying $02 n-1 \\geq 1$. Combining these we get\n\n$$\nd(x)=\\frac{1}{x}+\\sum_{m=1}^{1009} \\frac{1}{(x-2 m)(x-2 m+1)}<1+1-4<-2 .\n$$", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 2.", "solution_match": "# Solution 2"}} {"year": "2018", "tier": "T1", "problem_label": "2", "problem_type": null, "exam": "APMO", "problem": "Let $f(x)$ and $g(x)$ be given by\n\n$$\nf(x)=\\frac{1}{x}+\\frac{1}{x-2}+\\frac{1}{x-4}+\\cdots+\\frac{1}{x-2018}\n$$\n\nand\n\n$$\ng(x)=\\frac{1}{x-1}+\\frac{1}{x-3}+\\frac{1}{x-5}+\\cdots+\\frac{1}{x-2017} .\n$$\n\nProve that\n\n$$\n|f(x)-g(x)|>2\n$$\n\nfor any non-integer real number $x$ satisfying $00 \\quad \\text { for } k=1,2, \\ldots, n-1, n+2, \\ldots, 1009 \\\\\n\\frac{1}{x-2 n}-\\frac{1}{x-2 n-1} & =\\frac{1}{(x-2 n)(2 n+1-x)} \\geq\\left(\\frac{2}{x-2 n+2 n+1-x}\\right)^{2}=4\n\\end{aligned}\n$$\n\nTherefore, summing all inequalities and collecting the remaining terms we find $f(x)-g(x)>$ $4+\\frac{1}{x-2}>4-1=3$ for $00$,\n\n$$\n\\begin{aligned}\nf(x)-g(x) & >\\frac{1}{x}-\\frac{1}{x-2 n+1}+4+\\frac{1}{x-2 n-2} \\\\\n& =\\frac{1}{x}-\\frac{1}{x-2 n+1}+4-\\frac{1}{2 n+2-x} \\\\\n& >\\frac{1}{x}-\\frac{1}{2 n-2 n+1}+4-\\frac{1}{2 n+2-2 n-1} \\\\\n& =2+\\frac{1}{x}>2 .\n\\end{aligned}\n$$", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 2.", "solution_match": "# Solution 3"}} {"year": "2018", "tier": "T1", "problem_label": "3", "problem_type": null, "exam": "APMO", "problem": "A collection of $n$ squares on the plane is called tri-connected if the following criteria are satisfied:\n(i) All the squares are congruent.\n(ii) If two squares have a point $P$ in common, then $P$ is a vertex of each of the squares.\n(iii) Each square touches exactly three other squares.\n\nHow many positive integers $n$ are there with $2018 \\leq n \\leq 3018$, such that there exists a collection of $n$ squares that is tri-connected?\n\nAnswer: 501", "solution": "We will prove that there is no tri-connected collection if $n$ is odd, and that tri-connected collections exist for all even $n \\geq 38$. Since there are 501 even numbers in the range from 2018 to 3018, this yields 501 as the answer.\n\nFor any two different squares $A$ and $B$, let us write $A \\sim B$ to mean that square $A$ touches square $B$. Since each square touches exactly three other squares, and there are $n$ squares in total, the total number of instances of $A \\sim B$ is $3 n$. But $A \\sim B$ if and only if $B \\sim A$. Hence the total number of instances of $A \\sim B$ is even. Thus $3 n$ and hence also $n$ is even.\n\nWe now construct tri-connected collections for each even $n$ in the range. We show two\nConstruction 1 The idea is to use the following two configurations. Observe that in each configuration every square is related to three squares except for the leftmost and rightmost squares which are related to two squares. Note that the configuration on the left is of variable length. Also observe that multiple copies of the configuration on the right can be chained together to end around corners.\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-5.jpg?height=164&width=835&top_left_y=752&top_left_x=625)\n\nPutting the above two types of configurations together as in the following figure yields a tri-connected collection for every even $n \\geq 38$.\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-5.jpg?height=309&width=789&top_left_y=1099&top_left_x=631)\n\nConstruction 2 Consider a regular $4 n$-gon $A_{1} A_{2} \\cdots A_{4 n}$, and make $4 n$ squares on the outside of the $4 n$-gon with one side being on the $4 n$-gon. Reflect squares sharing sides $A_{4 m+2} A_{4 m+3}, A_{4 m+3} A_{4 m+4}$ across line $A_{4 m+2} A_{4 m+4}$, for $0 \\leq m \\leq n-1$. This will produce a tri-connected set of $6 n$ squares, as long as the squares inside the $4 n$-gon do not intersect. When $n \\geq 4$, this will be true. The picture for $n=24$ is as follows:\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-5.jpg?height=830&width=824&top_left_y=1758&top_left_x=593)\n\nTo treat the other cases, consider the following gadget\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-6.jpg?height=184&width=272&top_left_y=296&top_left_x=869)\n\nTwo squares touch 3 other squares, and the squares containing $X, Y$ touch 2 other squares. Take the $4 n$-gon from above, and break it into two along the line $A_{1} A_{2 n}$, moving the two parts away from that line. Do so until the gaps can be exactly filled by inserting two copies of the above figure, so that the vertices $X, Y$ touch the two vertices which used to be $A_{1}$ in one instance, and the two vertices which used to be $A_{2 n}$ in the other.\nThis gives us a valid configuration for $6 n+8$ squares, $n \\geq 4$. Finally, if we had instead spread the two parts out more and inserted two copies of the above figure into each gap, we would get $6 n+16$ for $n \\geq 4$, which finishes the proof for all even numbers at least 36 .", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 3.", "solution_match": "\nSolution."}} {"year": "2018", "tier": "T1", "problem_label": "4", "problem_type": null, "exam": "APMO", "problem": "Let $A B C$ be an equilateral triangle. From the vertex $A$ we draw a ray towards the interior of the triangle such that the ray reaches one of the sides of the triangle. When the ray reaches a side, it then bounces off following the law of reflection, that is, if it arrives with a directed angle $\\alpha$, it leaves with a directed angle $180^{\\circ}-\\alpha$. After $n$ bounces, the ray returns to $A$ without ever landing on any of the other two vertices. Find all possible values of $n$.\n\nAnswer: All $n \\equiv 1,5 \\bmod 6$ with the exception of 5 and 17", "solution": "Consider an equilateral triangle $A A_{1} A_{2}$ of side length $m$ and triangulate it with unitary triangles. See the figure. To each of the vertices that remain after the triangulation we can assign a pair of coordinates $(a, b)$ where $a, b$ are non-negative integers, $a$ is the number of edges we travel in the $A A_{1}$ direction and $b$ is the number of edges we travel in the $A A_{2}$ direction to arrive to the vertex, (we have $A=(0,0), A_{1}=(m, 0)$ and $A_{2}=(0, m)$ ). The unitary triangle with vertex $A$ will be our triangle $A B C,(B=(1,0), C=(0,1))$. We can obtain every unitary triangle by starting with $A B C$ and performing reflections with respect to a side (the vertex $(1,1)$ is the reflection of $A$ with respect to $B C$, the vertex $(0,2)$ is the reflection of $B=(1,0)$ with respect to the side formed by $C=(1,0)$ and $(1,1)$, and so on).\n\nWhen we reflect a vertex $(a, b)$ with respect to a side of one of the triangles, the congruence of $a-b$ is preserved modulo 3. Furthermore, an induction argument shows that any two vertices $(a, b)$ and $\\left(a^{\\prime}, b^{\\prime}\\right)$ with $a-b \\equiv a^{\\prime}-b^{\\prime}$ mod 3 can be obtained from each other by a series of such reflections. Therefore, the set of vertices $V$ that result from the reflections of $A$ will be those of the form $(a, b)$ satisfying $a \\equiv b \\bmod 3$. See the green vertices in the figure.\n\nNow, let $U$ be the set of vertices $u$ that satisfy that the line segment between $u$ and $A$ does not pass through any other vertex. A pair $(a, b)$ is in $U$ if and only if $\\operatorname{gcd}(a, b)=1$, since otherwise for $d=\\operatorname{gcd}(a, b)$ we have that the vertex $(a / d, b / d)$ also lies on the line segment between $u$ and $A$.\n\nObserve that the rays that come out from $A$ and eventually return to $A$ are those that come out towards a vertex in $V \\cap U$ (they would be in $V$ to be able to come back to $A$ and in $U$ so that they do not reach a vertex beforehand). In the diagram, a ray toward one such vertex $(a, b)$ will intersect exactly $(a-1)+(b-1)+(a+b-1)=2(a+b)-3$ lines: $a-1$ of them parallel to $A B, b-1$ parallel to $A C$ and $a+b-1$ parallel to $B C$. Therefore, in the triangle $A B C$ the ray will bounce $2(a+b)-3$ times before returning to $A$. So we want to find all\n![](https://cdn.mathpix.com/cropped/2024_11_22_c87ece96a341aa1506ccg-7.jpg?height=906&width=1044&top_left_y=175&top_left_x=506)\n$n=2(a+b)-3$ where $a \\equiv b \\bmod 3$ and $\\operatorname{gcd}(a, b)=1$.\nIf $a+b$ is a multiple of 3 then we cannot satisfy both conditions simultaneously, therefore $n$ is not a multiple of 3 . We also know that $n$ is odd. Therefore $n \\equiv 1,5,7,11 \\bmod 12$. Note that the pair $(1,3 k+1)$ satisfies the conditions and we can create $n=2(3 k+2)-3=6 k+1$ for all $k \\geq 0$ (this settles the question for $n \\equiv 1,7 \\bmod 12$ ). For $n \\equiv 5 \\bmod 12$ consider the pair $(3 k-1,3 k+5)$ when $k$ is even or $(3 k-4,3 k+8)$ when $k$ is odd. This gives us all the integers of the form $12 k+5$ for $k \\geq 2$. For $11 \\bmod 12$, take the pairs $(3 k-1,3 k+2)($ with $k \\geq 1)$, which yield all positive integers of the form $12 k-1$.\n\nFinally, to discard 5 and 17 note that the only pairs $(a, b)$ that are solutions to $2(a+b)-3=5$ or $2(a+b)-3=17$ with the same residue $\\bmod 3$ in this range are the non-relatively prime pairs $(2,2),(2,8)$ and $(5,5)$.", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 4.", "solution_match": "\nSolution."}} {"year": "2018", "tier": "T1", "problem_label": "5", "problem_type": null, "exam": "APMO", "problem": "Find all polynomials $P(x)$ with integer coefficients such that for all real numbers $s$ and $t$, if $P(s)$ and $P(t)$ are both integers, then $P(s t)$ is also an integer.\n\nAnswer: $P(x)=x^{n}+k,-x^{n}+k$ for $n$ a non-negative integer and $k$ an integer.", "solution": ": $P(x)=x^{n}+k,-x^{n}+k$ for $n$ a non-negative integer and $k$ an integer.\nNotice that if $P(x)$ is a solution, then so is $P(x)+k$ and $-P(x)+k$ for any integer $k$, so we may assume that the leading coefficient of $P(x)$ is positive and that $P(0)=0$, i.e., we can assume that $P(x)=\\sum_{i=1}^{n} a_{i} x^{i}$ with $a_{n}>0$. We are going to prove that $P(x)=x^{n}$ in this case.\n\nLet $p$ be a large prime such that $p>\\sum_{i=1}^{n}\\left|a_{i}\\right|$. Because $P$ has a positive leading coefficient and $p$ is large enough, we can find $t \\in \\mathbb{R}$ such that $P(t)=p$. Denote the greatest common divisor of the polynomial $P(x)-p$ and $P(2 x)-P(2 t)$ as $f(x)$, and $t$ is a root of it, so $f$ is a non-constant polynomial. Notice that $P(2 t)$ is an integer by using the hypothesis for $s=2$ and $t$. Since $P(x)-p$ and $P(2 x)-P(2 t)$ are polynomials with integer coefficients, $f$ can be chosen as a polynomial with rational coefficients.\n\nIn the following, we will prove that $f$ is the same as $P(x)-p$ up to a constant multiplier. Say $P(x)-p=f(x) g(x)$, where $f$ and $g$ are non-constant polynomials. By Gauss's lemma, we can get $f_{1}, g_{1}$ with $P(x)-p=f_{1}(x) g_{1}(x)$ where $f_{1}$ is a scalar multiple of $f$ and $g_{1}$ is a scalar multiple of $g$ and one of $f_{1}, g_{1}$ has constant term $\\pm 1$ (this is because $-p=P(0)-p=f(0) g(0)$ with $p$ prime). So $P(x)-p$ has at least one root $r$ with absolute value not greater than 1 (using\n\nVieta, the product of the roots of the polynomial with constant term $\\pm 1$ is $\\pm 1$ ), but\n\n$$\n|P(r)-p|=\\left|\\sum_{i=1}^{n} a_{i} r^{i}-p\\right|>p-\\sum_{i=1}^{n}\\left|a_{i}\\right|>0\n$$\n\nhence we get a contradiction!\nTherefore $f$ is a constant multiple of $P(x)-p$, so $P(2 x)-P(2 t)$ is a constant multiple of $P(x)-p$ because they both have the same degree. By comparing leading coefficients we get that $P(2 x)-P(2 t)=2^{n}(P(x)-p)$. Comparing the rest of the coefficients we get that $P(x)=a_{n} x^{n}$. If we let $a=b=\\left(1 / a_{n}\\right)^{1 / n}$, then $P(a)=P(b)=1$, so $P(a b)$ must also be an integer. But $P(a b)=\\frac{1}{a_{n}}$. Therefore $a_{n}=1$ and the proof is complete.", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 5.", "solution_match": "\nSolution 1"}} {"year": "2018", "tier": "T1", "problem_label": "5", "problem_type": null, "exam": "APMO", "problem": "Find all polynomials $P(x)$ with integer coefficients such that for all real numbers $s$ and $t$, if $P(s)$ and $P(t)$ are both integers, then $P(s t)$ is also an integer.\n\nAnswer: $P(x)=x^{n}+k,-x^{n}+k$ for $n$ a non-negative integer and $k$ an integer.", "solution": ": Assume $P(x)=\\sum_{i=0}^{n} a_{i} x^{i}$. Consider the following system of equations\n\n$$\n\\begin{aligned}\n& a_{0}=P(0) \\\\\n& a_{n} t^{n}+a_{n-1} t^{n-1}+\\cdots+a_{0}=P(t) \\\\\n& 2^{n} a_{n} t^{n}+2^{n-1} a_{n-1} t^{n-1}+\\cdots+a_{0}=P(2 t) \\\\\n& \\vdots \\\\\n& n^{n} a_{n} t^{n}+n^{n-1} a_{n-1} t^{n-1}+\\cdots+a_{0}=P(n t)\n\\end{aligned}\n$$\n\nviewing $a_{k} t^{k}$ as variables. Note that if $P(t)$ is an integer, then by the hypothesis all the terms on the right hand side of the equations are integers as well. By using Cramer's rule, we can get that $a_{k} t^{k}=D / M$, where $D$ is an integer and $M$ is the following determinant\n\n$$\n\\left|\\begin{array}{ccccc}\n1 & 0 & 0 & \\cdots & 0 \\\\\n1 & 1 & 1 & \\cdots & 1 \\\\\n1 & 2 & 4 & \\cdots & 2^{n} \\\\\n\\vdots & \\vdots & \\vdots & & \\vdots \\\\\n1 & n & n^{2} & \\cdots & n^{n}\n\\end{array}\\right| \\neq 0\n$$\n\nThus, if we let $r$ be the smallest positive index such that $a_{r} \\neq 0$, we can express each $t \\in \\mathbb{R}$ with $P(t) \\in \\mathbb{Z}$ in the form $\\left(\\frac{m}{M^{\\prime}}\\right)^{1 / r}$ for some integer $m$, and where $M^{\\prime}=M \\times a_{r}$ is a constant.\n\nWe can choose $L$ large enough such that $\\left.P\\right|_{\\mathbb{R}_{\\geq L}}$ is injective, and for any larger $N$, the growth order of the number of values in the form $\\left(\\frac{m}{M^{\\prime}}\\right)^{1 / r}$ is $N^{r}$, while the growth order of the number of integers in $[P(L), P(N)]$ is $N^{n}$, so $r=n$. Therefore $P(x)$ is of the form $a_{n} x^{n}+k$. The problem can be finished as in Solution 1.", "metadata": {"resource_path": "APMO/segmented/en-apmo2018_sol.jsonl", "problem_match": "\nProblem 5.", "solution_match": "\nSolution 2"}}