![](https://cdn.mathpix.com/cropped/2024_11_22_954c1edb53eb2110c797g-1.jpg?height=324&width=1659&top_left_y=231&top_left_x=233) # Official Solutions for CMO 2024 P1. Let $A B C$ be a triangle with incenter $I$. Suppose the reflection of $A B$ across $C I$ and the reflection of $A C$ across $B I$ intersect at a point $X$. Prove that $X I$ is perpendicular to $B C$. (The incenter is the point where the three angle bisectors meet.) Solution. Suppose the reflection of $A C$ across $B I$ intersects $B C$ at $E$. Define $F$ similarly for the reflection of $A B$ across $C I$. Also suppose $C I$ intersects $A B$ at $M$ and $B I$ intersects $A C$ at $N$. Since $C A$ and $C F=B C$ are reflections across $C I$, and so are $M A$ and $M F=X M$, we have that $A$ and $F$ are reflections across $C I$. Similarly $A$ and $E$ are reflections across $B I$. Thus $\angle X F C=\angle B A C=\angle X E B$ if $\angle B A C$ is acute (and $\angle X F C=\angle X E B=\pi-\angle B A C$, when $\angle B A C$ is obtuse), so $X F=X E$. Moreover we also find that $I F=I A=I E$ by the aforementioned reflection properties, so thus $X I$ is the perpendicular bisector of $E F$ and is hence perpendicular to $B C$. P2. Jane writes down 2024 natural numbers around the perimeter of a circle. She wants the 2024 products of adjacent pairs of numbers to be exactly the set $\{1!, 2!, \ldots, 2024!\}$. Can she accomplish this? Solution 1. Given any prime $p$ and positive integer $x$, let $v_{p}(x)$ denote the highest power of $p$ dividing $x$. We claim that Jane cannot write 2024 such numbers as that would imply that $1!\cdot 2!\cdots 2024$ ! is the square of the product of the 2024 numbers. Let $p$ be a prime and $k$ be a natural number such that $k2024$. Then note that $$ v_{p}(1!\cdot 2!\cdots 2024!)=(2024-p+1)+(2024-2 p+1)+\ldots+(2024-k p+1) $$ In particular, let $p$ be in $\left(\frac{2024}{4}, \frac{2024}{2}\right)$. By Bertrand's Postulate, such a prime $p$ exists (and $p$ must also be odd). Further, the corresponding $k$ is either 2 or 3 . Either way, $v_{p}(1!\cdot 2!\cdots 2024$ !) is odd from the above formula, and so $1!\cdot 2!\cdots 2024$ ! cannot be a perfect square. Solution 2. As in the first solution, we prove $1!\cdot 2!\cdots 2024$ ! is not a perfect square. To do this, note that we can rewrite the product as $(1!)^{2} \cdot 2 \cdot(3!)^{2} \cdot 4 \cdots(2023!)^{2} \cdot 2024$ which is $$ 2 \cdot 4 \cdots 2024 \cdot(1!\cdot 3!\cdots 2023!)^{2}=1012!\cdot\left(2^{1012} \cdot 1!\cdot 3!\cdots 2023!\right)^{2} $$ so it is sufficient to verify 1012 ! is not a perfect square. This can be verified by either noticing the prime 1009 only appears as a factor of 1012 ! once, or by evaluating $v_{2}(1012!)=1005$. P3. Let $N$ be the number of positive integers with 10 digits $\overline{d_{9} d_{8} \cdots d_{1} d_{0}}$ in base 10 (where $0 \leq d_{i} \leq 9$ for all $i$ and $d_{9}>0$ ) such that the polynomial $$ d_{9} x^{9}+d_{8} x^{8}+\cdots+d_{1} x+d_{0} $$ is irreducible in $\mathbb{Q}$. Prove that $N$ is even. (A polynomial is irreducible in $\mathbb{Q}$ if it cannot be factored into two non-constant polynomials with rational coefficients.) Solution. Let $f(x)=d_{9} x^{9}+d_{8} x^{8}+\cdots+d_{1} x+d_{0}$. If $d_{0}=0$, then $f(x)$ is divisible by $x$ and thus reducible, so we may ignore all such polynomials. The remaining polynomials all have nonzero leading and constant coefficients. For any polynomial $p(x)$ of degree $n$ with nonzero leading and constant coefficients, say $p(x)=a_{n} x^{n}+a_{n-1} x^{n-1}+\cdots+a_{1} x+a_{0}$, define $\bar{p}(x)$ to be the reversed polynomial $a_{0} x^{n}+$ $a_{1} x^{n-1}+\cdots+a_{n-1} x+a_{n}$. Observe that $\bar{p}(x)$ also has degree $n$ and furthermore, $\bar{p}(x)=$ $x^{n}\left(a_{0}+a_{1}\left(\frac{1}{x}\right)+\cdots+a_{n-1}\left(\frac{1}{x}\right)^{n-1}+a_{n}\left(\frac{1}{x}\right)^{n}\right)=x^{n} p\left(\frac{1}{x}\right)$. Consider pairing each $f(x)$ with $\bar{f}(x)$ whenever $f(x) \neq \bar{f}(x)$. If $f(x)$ is reducible, it can be factored as $f(x)=g(x) h(x)$ where $\operatorname{deg} g, \operatorname{deg} h \geq 1$. Because the leading and constant coefficients of $f(x)$ are nonzero, so are the leading and constant coefficients of $g(x)$ and $h(x)$. Hence $\bar{g}(x)$ and $\bar{h}(x)$ are well defined with $\operatorname{deg} \bar{g}=\operatorname{deg} g \geq 1$ and $\operatorname{deg} \bar{h}=\operatorname{deg} h \geq 1$. Furthermore, $$ \bar{f}(x)=x^{9} f\left(\frac{1}{x}\right)=x^{9} g\left(\frac{1}{x}\right) h\left(\frac{1}{x}\right)=\left(x^{\operatorname{deg} g} g\left(\frac{1}{x}\right)\right)\left(x^{\operatorname{deg} h} h\left(\frac{1}{x}\right)\right)=\bar{g}(x) \bar{h}(x) $$ Thus $\bar{f}(x)=\bar{g}(x) \bar{h}(x)$ is a factorization of $\bar{f}(x)$ into two non-constant polynomials, so $\bar{f}(x)$ is also reducible. Therefore $f(x)$ is irreducible if and only if $\bar{f}(x)$ is irreducible, so considering each pair, there are an even number of irreducible polynomials with $f(x) \neq \bar{f}(x)$. Finally, note that if $f(x)=\bar{f}(x)$, then $d_{i}=d_{9-i}$ for each $i$. In such a case, we have $f(-1)=$ $\left(d_{0}-d_{9}\right)+\left(d_{2}-d_{7}\right)+\left(d_{4}-d_{5}\right)+\left(d_{6}-d_{3}\right)+\left(d_{8}-d_{1}\right)=0$, so by the Factor Theorem, $(x+1)$ is a factor of $f(x)$. Therefore these remaining polynomials are all reducible. P4. Centuries ago, the pirate Captain Blackboard buried a vast amount of treasure in a single cell of an $M \times N(2 \leq M, N)$ grid-structured island. You and your crew have reached the island and have brought special treasure detectors to find the cell with the treasure. For each detector, you can set it up to scan a specific subgrid $[a, b] \times[c, d]$ with $1 \leq a \leq b \leq M$ and $1 \leq c \leq d \leq N$. Running the detector will tell you whether the treasure is in the region or not, though it cannot say where in the region the treasure was detected. You plan on setting up $Q$ detectors, which may only be run simultaneously after all $Q$ detectors are ready. In terms of $M$ and $N$, what is the minimum $Q$ required to guarantee your crew can determine the location of Blackboard's legendary treasure? Solution 1. Let $m=\left\lceil\frac{M}{2}\right\rceil$ and $n=\left\lceil\frac{N}{2}\right\rceil$. We claim that the minimal $Q$ is $m+n$. For the construction, start with $m$ detectors covering $[i, i+m-1] \times[1, N]$ for $1 \leq i \leq m$. For every pair of rows, there is a detector that covers one row but not the other, hence this determines the row of the treasure. Similarly, placing $n$ detectors covering $[1, M] \times[i, i+n-1]$ for $1 \leq i \leq n$ determines the column, and thus the location of the treasure. For the bound, we require the following lemma. Lemma. $A 1 \times k$ island requires at least $\left\lceil\frac{k}{2}\right\rceil$ detectors. Proof. Consider the $k-1$ lines separating the cells. If one of these lines is not covered by any detector, then these cells are indistinguishable. Similarly, if neither of the vertical lines at the ends are covered, then the first and last cells are indistinguishable. In particular, at least $k$ vertical lines need to be covered by the detectors. A detector covers 2 vertical lines, giving the result. In general, consider the first row. Since the cells are distinguishable, by the lemma there must be at least $n$ detectors that intersect it non-trivially (as in, cover between 1 and $N-1$ of the cells). The analogous result holds for the last row and the first/last columns, giving $2 m+2 n$ detectors, where a detector may be counted multiple times. If a detector intersected at least three of these sets, say it intersected the first row and the first and last columns. Therefore it covers the entire width of the island, and does not actually distinguish any cells in the first row, contradiction. Therefore each detector contributes to at most 2 of the above $2 m+2 n$ detectors, giving the final lower bound of $\frac{2 m+2 n}{2}=m+n$ detectors required, as desired. Solution 2. The following alternative approach from CMO competitor Marvin Mao of Bergen County Academies is another full solution. Take the same construction as in Solution 1. For the bound, consider the following sets: - $S_{\mathrm{CR}}:=\{\{(1,1),(1, N)\},\{(M, 1),(M, N)\}\}$, i.e. the pairs of corners on the same row; - $S_{\mathrm{CC}}:=\{\{(1,1),(M, 1)\},\{(1, N),(M, N)\}\}$, i.e. the pairs of corners on the same column; - $S_{\mathrm{R}}:=\{\{(x, i),(x, i+1)\}: x \in\{1, M\}, 1 \leq i \leq N-1\}$, i.e. the pairs of adjacent edges on the first/last row; - $S_{\mathrm{C}}:=\{\{(i, x),(i+1, x)\}: 1 \leq i \leq M-1, x \in\{1, N\}$, $\}$, i.e. the pairs of adjacent edges on the first/last column. For each detector, we assign it a score $\left(x_{\mathrm{CR}}, x_{\mathrm{CC}}, x_{\mathrm{R}}, x_{\mathrm{C}}\right)$, where $x_{\mathrm{i}}$ is the number of pairs of cells in $S_{\mathrm{i}}$ for which the detector covers exactly one of the two cells. The possible scores of the detectors are as follows: | What the detector hits | Score | | :---: | :---: | | No edges | $(0,0,0,0)$ | | One edge, no corners | $(0,0,2,0)$ or $(0,0,0,2)$ | | Two edges, no corners | $(0,0,4,0)$ or $(0,0,0,4)$ | | One corner | $(1,1,1,1)$ | | Two corners | $(2,0,2,0)$ or $(0,2,0,2)$ | | $>2$ corners or edges | $(0,0,0,0)$ | In order to determine the treasure, the total component-wise sum of scores of the detectors needs to be at least $(2,2,2 N-2,2 M-2)$, since we need to tell apart each of the pairs of cells. The sum of these components is $2 M+2 N$, and based on the analysis above, each detector adds a total component sum of at most 4 , giving at least $\left\lceil\frac{2 M+2 N}{4}\right\rceil=\left\lceil\frac{M+N}{2}\right\rceil$ detectors. This is equal to $\left\lceil\frac{M}{2}\right\rceil+\left\lceil\frac{N}{2}\right\rceil$ except if both $M, N$ are odd. In this case, if there is at least one more detector, then we have the required bound, so assume otherwise. In particular, we must achieve exactly the score $(2,2,2 N-2,2 M-2)$, with each detector contributing 4 to the total component sum. In particular, to fill out the first two components, we must either have two detectors scoring $(1,1,1,1)$, or two detectors scoring $(2,0,2,0)$ and $(0,2,0,2)$. This yields a total score of $(2,2,2,2)$, leaving us with achieving exactly $(0,0,2 N-4,2 M-4)$ from the rest. Since we cannot have a non-zero score in the first two entries and must have a total component sum of 4 , we can only use detectors scoring $(0,0,4,0)$ or $(0,0,0,4)$. But $2 N-4,2 M-4 \equiv 2$ $(\bmod 4)$, which is a contradiction. Therefore all situations require at least $\left\lceil\frac{M}{2}\right\rceil+\left\lceil\frac{N}{2}\right\rceil$ detectors. P5. Initially, three non-collinear points, $A, B$, and $C$, are marked on the plane. You have a pencil and a double-edged ruler of width 1. Using them, you may perform the following operations: - Mark an arbitrary point in the plane. - Mark an arbitrary point on an already drawn line. - If two points $P_{1}$ and $P_{2}$ are marked, draw the line connecting $P_{1}$ and $P_{2}$. - If two non-parallel lines $\ell_{1}$ and $\ell_{2}$ are drawn, mark the intersection of $\ell_{1}$ and $\ell_{2}$. - If a line $\ell$ is drawn, draw a line parallel to $\ell$ that is at distance 1 away from $\ell$ (note that two such lines may be drawn). Prove that it is possible to mark the orthocenter of $A B C$ using these operations. ## Solution 1. Claim 1. It is possible to draw internal/external angle bisectors. Proof. Let $A, B, C$ be marked. To bisect $\angle A B C$, draw the parallel line to $A B$ unit 1 away from it on the opposite side as $C$, and draw the parallel line to $B C$ unit 1 away from it on the opposite side as $A$. Let these lines intersect at $D$. Then $B D$ is the internal angle bisector of $\angle A B C$. We can construct external angle bisectors similarly by drawing the line on the same side as $A$ for the second line instead. Corollary 2. It is possible to mark the incenters and excenters of a triangle $A B C$. Proof. Draw in the internal/external bisectors of all three angles and intersect them. Claim 3. It is possible to mark the midpoint of any segment $A B$. Proof. Let $B$ and $C$ be marked. Draw an arbitrary point $A$ not on line $B C$. Draw a line parallel to $B C$ unit 1 away from it on the opposite side as $A$, and let this line intersect $A B$ at $D$ and $A C$ at $E$. Let $B E$ and $C D$ intersect at $F$, and let $A F$ intersect $B C$ at $M$. Then by Ceva's Theorem, $M$ is the midpoint of $B C$. Corollary 4. It is possible to mark the centroid of $A B C$. Proof. Draw the midpoint $D$ of $B C$ and the midpoint $E$ of $A C$, and intersect $A D$ with BE. Claim 5. It is possible to draw the perpendicular bisector of any segment BC. Proof. Let $B$ and $C$ be marked. Draw an arbitrary point $A$ not on line $B C$. Construct the incenter $I$ and $A$-excenter $I_{A}$ of $A B C$. Draw the midpoint $M$ of $B C$ and midpoint $N$ of $I I_{A}$. By the incenter-excenter lemma, $N$ is the midpoint of the $\operatorname{arc} \overparen{B C}$ not containing $A$, so $M N$ is the perpendicular bisector of $B C$. Corollary 6. It is possible to mark the circumcenter of $A B C$. Proof. Draw and intersect the perpendicular bisectors of $B C$ and $A C$. Claim 7. Given two marked points $A$ and $B$, it is possible to mark the point $C$ such that $\overrightarrow{B C}=\frac{1}{2} \overrightarrow{A B}$. Proof. Draw an arbitrary point $D$ not on line $A B$. Draw the midpoint $M$ of $A D$. Draw the midpoint $M_{1}$ of $B D$ and the midpoint $M_{2}$ of $M D$, and let $M_{1} M_{2}$ intersect $A B$ at $C$. Then $M_{1} M_{2} \| B M$ and $M M_{2}=\frac{1}{2} M D=\frac{1}{2} A M$, so $B C=\frac{1}{2} A B$. Claim 8. Given two marked points $A$ and $B$ and any positive real number $k$ such that $2 k \in \mathbb{Z}$, it is possible to mark the point $C$ such that $\overrightarrow{B C}=k \overrightarrow{A B}$. Proof. Note that by applying Claim 7 and marking the midpoint of $A B$, we can translate both $A$ and $B$ by $\frac{1}{2} \overrightarrow{A B}$. The claim now follows by applying this operation repeatedly. To finish, take the given triangle $A B C$ and mark its circumcenter $O$ and centroid $G$. Note that its orthocenter $H$ satisfies that $\overrightarrow{G H}=2 \overrightarrow{O G}$, so applying Claim 8 to $k=2$ now finishes the problem. Solution 2. Ming Yang of Brophy College Preparatory submitted the following short, elegant solution which also creates tools that are able to extend beyond the problem. This solution has been designated by the CMO as the Best Solution for 2024 and earns Ming Yang the Matthew Brennan Award this year. Start with Claims 1-3 of solution 1, allowing us to draw internal/external angle bisectors, in/excentres, and midpoints. We add one more claim. Claim 9. Given a point $P$ and a line $\ell_{1}$, it is possible to draw a line through $P$ parallel to $\ell_{1}$. Proof. Draw the line $\ell_{2}$ on the opposite side of $\ell_{1}$ to $P$, a distance 1 away. Draw arbitrary lines $P A B$ and $P C D$ with $A, C \in \ell_{1}, B, D \in \ell_{2}$. Let $E$ be the midpoint of $A C$, let $F=P E \cap \ell_{2}$, and let $Q=B E \cap F C$. Since $\triangle Q E C \sim \triangle Q B F$ and $\triangle P A E \sim \triangle P B F$, we have $$ \frac{Q E}{Q B}=\frac{E C}{B F}=\frac{A E}{B F}=\frac{P A}{P B} $$ so $\triangle B A E \sim \triangle B P Q$. In particular, $P Q$ is parallel to $A E$, as desired. In triangle $\triangle A B C$, draw the incentre $I$ and $A$-excentre $I_{A}$. Draw the midpoints $D$ of $B C$ and $M$ of $I I_{A}$. By the incentre-excentre lemma, $M$ is on the perpendicular bisector of $B C$, so $M D$ is perpendicular to $B C$. Finally, using Claim 9, we can draw a line through $A$ that is perpendicular to $B C$. Repeat this for $B$ and $A C$, and their intersection is the orthocentre of $\triangle A B C$, as required.