{"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". Find all functions $f: \\mathbb{Q}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ such that\n\n$$\nf(x y) \\cdot \\operatorname{gcd}\\left(f(x) f(y), f\\left(\\frac{1}{x}\\right) f\\left(\\frac{1}{y}\\right)\\right)=x y f\\left(\\frac{1}{x}\\right) f\\left(\\frac{1}{y}\\right)\n$$\n\nfor all $x, y \\in \\mathbb{Q}_{>0}$, where $\\operatorname{gcd}(a, b)$ denotes the greatest common divisor of $a$ and $b$.", "solution": "Let $f: \\mathbb{Q}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ be a function satisfying\n\n$$\nf(x y) \\cdot \\operatorname{gcd}\\left(f(x) f(y), f\\left(\\frac{1}{x}\\right) f\\left(\\frac{1}{y}\\right)\\right)=x y f\\left(\\frac{1}{x}\\right) f\\left(\\frac{1}{y}\\right)\n$$\n\nfor all $x, y \\in \\mathbb{Q}_{>0}$. Taking $y=\\frac{1}{x}$ in (1), we obtain\n\n$$\nf(1) \\cdot \\operatorname{gcd}\\left(f(x) f\\left(\\frac{1}{x}\\right), f\\left(\\frac{1}{x}\\right) f(x)\\right)=f\\left(\\frac{1}{x}\\right) f(x),\n$$\n\nwhich directly implies that $f(1)=1$. Now if we take $y=1$ in (1), we get\n\n$$\nf(x) \\cdot \\operatorname{gcd}\\left(f(x), f\\left(\\frac{1}{x}\\right)\\right)=x f\\left(\\frac{1}{x}\\right) .\n$$\n\nReplacing $x$ with $\\frac{1}{x}$ in the latter equation, we also get\n\n$$\nf\\left(\\frac{1}{x}\\right) \\cdot \\operatorname{gcd}\\left(f\\left(\\frac{1}{x}\\right), f(x)\\right)=\\frac{1}{x} f(x) .\n$$\n\nComparing (2) and (3), we deduce that\n\n$$\nf(x)^{2}=x^{2} f\\left(\\frac{1}{x}\\right)^{2}\n$$\n\nwhich can be rewritten as\n\n$$\nf(x)=x f\\left(\\frac{1}{x}\\right)\n$$\n\nfor all $x \\in \\mathbb{Q}_{>0}$. We can therefore replace $f(x)$ with $x f\\left(\\frac{1}{x}\\right)$ in (2), and this gives us\n\n$$\n\\operatorname{gcd}\\left(x f\\left(\\frac{1}{x}\\right), f\\left(\\frac{1}{x}\\right)\\right)=1\n$$\n\nWhen $x \\in \\mathbb{Z}_{>0}$, the greatest common divisor of $x f\\left(\\frac{1}{x}\\right)$ and $f\\left(\\frac{1}{x}\\right)$ is $f\\left(\\frac{1}{x}\\right)$, so that we find\n\n$$\nf\\left(\\frac{1}{x}\\right)=1 \\quad \\text { for all } x \\in \\mathbb{Z}_{>0}\n$$\n\nUsing (4), we then also get that\n\n$$\nf(x)=x \\quad \\text { for all } x \\in \\mathbb{Z}_{>0} .\n$$\n\nFinally, given a positive rational number $q=\\frac{m}{n}$ with $m, n \\in \\mathbb{Z}_{>0}$, we can find the value of $f\\left(\\frac{m}{n}\\right)$ by taking $x=m$ and $y=\\frac{1}{n}$ in the initial equation (1):\n\n$$\nf\\left(\\frac{m}{n}\\right)=\\frac{m}{\\operatorname{gcd}(m, n)}\n$$\n\nIf $m$ and $n$ are chosen to be coprime, then we obtain the nice formula\n\n$$\nf\\left(\\frac{m}{n}\\right)=m \\quad \\text { for all } m, n \\in \\mathbb{Z}_{>0} \\text { such that } \\operatorname{gcd}(m, n)=1\n$$\n\nSo the only function $f: \\mathbb{Q}_{>0} \\rightarrow \\mathbb{Z}_{>0}$ that can possibly satisfy the statement is the function defined by (7). We claim that this function indeed satisfies the statement. Indeed, if we write $x=\\frac{a}{b}$ and $y=\\frac{c}{d}$ with $\\operatorname{gcd}(a, b)=1$ and $\\operatorname{gcd}(c, d)=1$ in (1), we obtain the equality\n\n$$\nf\\left(\\frac{a c}{b d}\\right) \\cdot \\operatorname{gcd}(a c, b d)=a c,\n$$\n\nwhich is true since\n\n$$\nf\\left(\\frac{a c}{b d}\\right)=f\\left(\\frac{\\frac{a c}{\\operatorname{gcd}(a c, b d)}}{\\frac{b d}{\\operatorname{gcd}(a c, b d)}}\\right)=\\frac{a c}{\\operatorname{gcd}(a c, b d)} .\n$$", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}} {"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". Let $n \\geqslant 2$ be an integer. Alice and Bob play a game concerning a country made of $n$ islands. Exactly two of those $n$ islands have a factory. Initially there is no bridge in the country. Alice and Bob take turns in the following way. In each turn, the player must build a bridge between two different islands $I_{1}$ and $I_{2}$ such that:\n\n- $I_{1}$ and $I_{2}$ are not already connected by a bridge;\n- at least one of the two islands $I_{1}$ and $I_{2}$ is connected by a series of bridges to an island with a factory (or has a factory itself). (Indeed, access to a factory is needed for the construction.)\n\nAs soon as a player builds a bridge that makes it possible to go from one factory to the other, this player loses the game. (Indeed, it triggers an industrial battle between both factories.) If Alice starts, then determine (for each $n \\geqslant 2$ ) who has a winning strategy.\n\n(Note: It is allowed to construct a bridge passing above another bridge.)", "solution": "The only configurations in which a player can only lose are the ones where there are $k$ islands (including one with a factory) all connected to each other, $n-k$ islands (including the one with the other factory) all connected to each other, and no bridge between these two sets of islands. Indeed, in this situation the player can only connect an island from the first component to an island to the other component and thus loses. Let us call such a situation a ( $k, n-k)$-critical configuration (for $k \\in\\{1,2, \\ldots, n-1\\}$ ). In all other configurations, it is possible to construct a bridge that does not connect the two factories.\n\nLet us count the number of bridges that exist in a $(k, n-k)$-critical configuration. We have $k$ islands connected to each other and $n-k$ islands connected to each other, so the total number of bridges is\n\n$$\nN(k, n-k)=\\left(\\begin{array}{c}\nk \\\\\n2\n\\end{array}\\right)+\\left(\\begin{array}{c}\nn-k \\\\\n2\n\\end{array}\\right)=\\frac{k(k-1)}{2}+\\frac{(n-k)(n-k-1)}{2} .\n$$\n\nWe are interested in the parity of this number, in order to know which turn it is (Alice's or Bob's turn) when a ( $k, n-k)$-critical configuration appears. We observe easily that the number $\\left(\\begin{array}{c}m \\\\ 2\\end{array}\\right)$ is even when $m \\equiv 0$ or $1(\\bmod 4)$, and odd when $m \\equiv 2$ or $3(\\bmod 4)$. Now let us distinguish some cases:\n\n(a) If $n \\equiv 1(\\bmod 4)$, then for any value of $k \\in\\{1, \\ldots, n-1\\}$ the numbers $k$ and $n-k$ will always be both equal to 0 or 1 modulo 4 , or both equal to 2 or 3 modulo 4 . This means that $\\left(\\begin{array}{l}k \\\\ 2\\end{array}\\right)$ and $\\left(\\begin{array}{c}n-k \\\\ 2\\end{array}\\right)$ always have the same parity in this case, and hence that $N(k, n-k)$ is even for any value of $k$. This implies that a $(k, n-k)$-critical configuration can only appear when it is Alice's turn. So Bob will never face such a situation and he will always be able to choose a bridge that does not connect the factories. Thus Bob has a winning strategy: he just needs to avoid the bridges that make him directly lose. At some point Alice will then be faced with a $(k, n-k)$-critical configuration for some $k$.\n\n(b) If $n \\equiv 3(\\bmod 4)$, then $n-k \\equiv 2$ or $3(\\bmod 4)$ as soon as $k \\equiv 1$ or $0(\\bmod 4)$, and vice versa. So $\\left(\\begin{array}{c}k \\\\ 2\\end{array}\\right)$ and $\\left(\\begin{array}{c}n-k \\\\ 2\\end{array}\\right)$ always have different parities, and $N(k, n-k)$ is odd for any value of $k$. Hence, a $(k, n-k)$-critical configuration can only appear when it is Bob's turn, which means that Alice has the winning strategy.\n(c) If $n$ is even, then a similar reasoning does not work. However, we can see that Bob has an easy winning strategy in this case: the mirror strategy. This strategy can be explained as follows. Before starting the game, let us partition the $n$ islands into $\\frac{n}{2}$ pairs of islands, so that the two islands with a factory belong to the same pair. Given an island $I$, we denote by $m(I)$ the island belonging to the same pair as $I$ (and we call $m(I)$ the mirror of $I$ ). Now the strategy of Bob is simple: if Alice constructs a bridge between islands $I_{1}$ and $I_{2}$, then Bob constructs a bridge between $m\\left(I_{1}\\right)$ and $m\\left(I_{2}\\right)$. In order to show that this is a winning strategy, we just need to observe that the configuration will always be symmetric after Bob's turn:\n\n- If there is a bridge between two islands $X$ and $Y$, then there is a bridge between $m(X)$ and $m(Y)$;\n- If an island $X$ is connected by a series of bridges to an island $F$ with a factory, then $m(X)$ is connected by a series of bridges (the mirror bridges) to $m(F)$, which is the other island with a factory.\n\nHence, when Alice constructs a bridge between $I_{1}$ and $I_{2}$ that does not make her lose (in particular $I_{2} \\neq m\\left(I_{1}\\right)$ ), we conclude that the bridge between $m\\left(I_{1}\\right)$ and $m\\left(I_{2}\\right)$ does not already exist and that it does not make Bob lose as well.\n\nAs a conclusion, Alice has a winning strategy when $n \\equiv 3(\\bmod 4)$ and Bob has a winning strategy when $n \\not \\equiv 3(\\bmod 4)$.[^0]", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}} {"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". In the convex quadrilateral $A B C D$ we have $\\angle B=\\angle C$ and $\\angle D=90^{\\circ}$. Suppose that $|A B|=2|C D|$. Prove that the angle bisector of $\\angle A C B$ is perpendicular to $C D$.", "solution": ". Let $P$ be the reflection of $C$ in $A D$; note that $C, D, P$ are collinear as $\\angle D=90^{\\circ}$. Then $|A B|=2|C D|=|C P|$, and since $\\angle A B C=\\angle B C P$ we have that $A B C P$ is an isosceles trapezoid. Hence $A P \\| B C$. In particular, we have $\\angle P A C=\\angle A C B$ and the bisectors of these two angles are parallel. Since triangle $A C P$ is isosceles with $D$ being the midpoint of segment $C P$, the bisector of $\\angle P A C$ is $A D$. Hence, the bisector of $\\angle A C B$ is parallel to $A D$ and therefore perpendicular to $C D$.", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}} {"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". In the convex quadrilateral $A B C D$ we have $\\angle B=\\angle C$ and $\\angle D=90^{\\circ}$. Suppose that $|A B|=2|C D|$. Prove that the angle bisector of $\\angle A C B$ is perpendicular to $C D$.", "solution": ". Let $M$ be the midpoint of segment $A B$ and $T$ be the intersection of lines $A C$ and $M D$. We know that $|M B|=|C D|$ and that $\\angle M B C=\\angle B C D$, so $M B C D$ is an isosceles trapezoid. Hence $M D \\| B C$, so it is a midline of $\\triangle A B C$. It follows that $T$ is the midpoint of segment $A C$. As $\\angle A D C=90^{\\circ}$ this implies that $T$ is the circumcentre of $\\triangle A C D$. Now we have $\\angle A C D=\\angle T C D=\\angle T D C=180^{\\circ}-\\angle B C D$. If we denote by $\\ell$ the perpendicular to $C D$ through $C$, then the latter equality implies that $C B$ is the reflection of $C A$ through $\\ell$. Hence $\\ell$ is the bisector of $\\angle A C B$.", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}} {"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". In the convex quadrilateral $A B C D$ we have $\\angle B=\\angle C$ and $\\angle D=90^{\\circ}$. Suppose that $|A B|=2|C D|$. Prove that the angle bisector of $\\angle A C B$ is perpendicular to $C D$.", "solution": ". Let $S$ be the intersection of $B C$ and $A D$ and let $M$ be the midpoint of segment $A B$. (Note that $S$ exists, since if $B C \\| A D$ then $A B C D$ must be a rectangle, contradicting $|A B|=2|C D|$.) We know that $|M B|=|C D|$ and that $\\angle M B C=\\angle B C D$, so $M B C D$ is an isosceles trapezoid. Hence $M D \\| B C$, so it is a midline of $\\triangle A B S$. In particular $D$ is the midpoint of segment $A S$, and triangles $A D C$ and $S D C$ are congruent. Hence $\\angle S C D=\\angle A C D$, so $C D$ is the angle bisector of $\\angle A C S$ and is thus perpendicular to the angle bisector of $\\angle A C B$.", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}} {"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". In the convex quadrilateral $A B C D$ we have $\\angle B=\\angle C$ and $\\angle D=90^{\\circ}$. Suppose that $|A B|=2|C D|$. Prove that the angle bisector of $\\angle A C B$ is perpendicular to $C D$.", "solution": ". Let $S$ be the intersection of $B C$ and $A D$ and let $F$ be the intersection of $B C$ with the line through $A$ parallel to $C D$. Then $\\angle A F B=\\angle A F C=180^{\\circ}-\\angle F C D=180^{\\circ}-\\angle A B C=$ $\\angle A B F$, so triangle $A B F$ is isosceles with $|A B|=|A F|$. Hence $|A F|=2|C D|$. Since $A F$ is parallel to $C D$, we find that $C D$ is a midline of $\\triangle A S F$, so $D$ is the midpoint of segment $A S$. Now $C D$ must be the perpendicular bisector of $A S$ and therefore it is also the angle bisector of $\\angle A C S$. This implies that it is perpendicular to the angle bisector of $\\angle A C B$.", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}} {"year": "2017", "tier": "T3", "problem_label": null, "problem_type": null, "exam": "Benelux_MO", "problem": ". A Benelux $n$-square (with $n \\geqslant 2$ ) is an $n \\times n$ grid consisting of $n^{2}$ cells, each of them containing a positive integer, satisfying the following conditions:\n\n- the $n^{2}$ positive integers are pairwise distinct;\n- if for each row and each column we compute the greatest common divisor of the $n$ numbers in that row/column, then we obtain $2 n$ different outcomes.\n\n(a) Prove that, in each Benelux $n$-square (with $n \\geqslant 2$ ), there exists a cell containing a number which is at least $2 n^{2}$.\n\n(b) Call a Benelux $n$-square minimal if all $n^{2}$ numbers in the cells are at most $2 n^{2}$. Determine all $n \\geqslant 2$ for which there exists a minimal Benelux $n$-square.", "solution": "Let us associate to each row and each column of a Benelux $n$-square the greatest common divisor of the $n$ numbers in that row/column, and call it the index of the row/column. By definition of a Benelux $n$-square, we know that these $2 n$ indices are different. In particular, there is a row/column whose index is $k \\geqslant 2 n$. The $n$ numbers in that row/column are distinct multiples of $k$, so the greatest of them is $\\geqslant n k \\geqslant 2 n^{2}$, which proves (a).\n\nLet us now consider a minimal Benelux $n$-square, and first assume that $n \\geqslant 3$. From the previous paragraph it is clear that the $2 n$ indices must exactly be $\\{1,2, \\ldots, 2 n\\}$, otherwise we would get a number $\\geqslant(2 n+1) n$ with the same argument. We can assume without loss of generality that $2 n$ is the index of a column. In order to have all numbers $\\leqslant 2 n^{2}$, the numbers in that column must exactly be the $n$ smallest multiple of $2 n$, i.e. $\\left\\{2 n, 4 n, \\ldots, 2 n^{2}\\right\\}$. We now argue that the index $2 n-1$ must correspond to a column. Indeed, if some row had index $2 n-1$, then the cell at the intersection of this row and the column indexed by $2 n$ would contain a number $x$ which is both a multiple of $2 n$ and $2 n-1$. Since $\\operatorname{gcd}(2 n, 2 n-1)=1$, this would imply $x \\geqslant 2 n(2 n-1)>2 n^{2}$, contradicting the fact that the Benelux $n$-square is minimal. With the same argument, $2 n-2$ cannot be the index of a row because $(2 n-1)(2 n-2)>2 n^{2}$ when $n \\geqslant 3$. We now distinguish the cases $n$ odd and $n$ even.\n\n- Suppose $n$ is odd. Then consider the row/column $A$ whose index is $n$. It must contain multiples of $n$, and we know that all multiples of $2 n$ are in the column indexed by $2 n$. First assume that $A$ is a column. Then we deduce that the numbers in $A$ are exactly $n, 3 n, \\ldots,(2 n-1) n$. But all these numbers are odd, so this implies that the indices of all rows are odd, i.e. they must exactly be $1,3, \\ldots, 2 n-1$. This is a contradiction with the fact that $2 n-1$ is the index of a column. Now assume that $A$ is a row. It has an intersection with the column indexed by $2 n$, but the other $n-1$ numbers in $A$ must belong to $\\{n, 3 n, \\ldots,(2 n-1) n\\}$. This implies that the indices of the corresponding $n-1$ columns are all odd, but this is a contradiction with the fact that $2 n-2$ is the index of a column. Hence, there does not exist a minimal Benelux $n$-square when $n$ is odd.\n- Suppose $n$ is even and assume moreover that $n \\geqslant 8$. With the same argument as earlier, we can deduce that $2 n-3$ and then $2 n-4$ are indices of a column (because\n$(2 n-3)(2 n-4)>2 n^{2}$ when $\\left.n \\geqslant 8\\right)$. Now we do the same reasoning as for $n$ odd but with multiples of $n-1$ instead of $n$. In the column whose index is $2 n-2$, we have $n$ multiples of $2 n-2$. There are exactly $n+1$ multiples of $2 n-2$ which are $\\leqslant 2 n^{2}$, since $(n+1)(2 n-2)=2 n^{2}-2$. Hence, this implies that there is only one multiple of $2 n-2$ which is small enough to appear in the square and which is not already in the column indexed by $2 n-2$. Consider the row/column $A$ whose index is $n-1$. If $A$ is a column, then $A$ contains at most one even number (the remaining multiple of $2 n-2$ ) and this implies that at least $n-1$ indices of rows are odd. This is a contradiction with the fact that $2 n-1$ and $2 n-3$ are indices of a column. Finally, if $A$ is a row, then we get at most one column different from the one indexed by $2 n-2$ which can be indexed by an even number. This is a contradiction with the fact that $2 n$ and $2 n-4$ are indices of columns. So there does not exist a minimal Benelux $n$-square when $n$ is even and $\\geqslant 8$.\n\nThe remaining cases are $n \\in\\{2,4,6\\}$ :\n\n- For $n=6$, we know as above that 12,11 and 10 are indices of columns. But then 9,8 and 7 cannot be indices of rows since $9 \\cdot 11,8 \\cdot 11,7 \\cdot 11$ cannot appear in the square. So they also are indices of columns. We can therefore do the same argumentation as for $n \\geqslant 8$ above to prove that there is no minimal Benelux 6 -square.\n- For $n=4$, we have the following minimal Benelux 4-square (numbers between parentheses are indices):\n\n| 5 | 6 | 7 | 8 | $(1)$ |\n| :---: | :---: | :---: | :---: | :---: |\n| 10 | 30 | 14 | 16 | $(2)$ |\n| 15 | 18 | 21 | 24 | $(3)$ |\n| 20 | 12 | 28 | 32 | $(4)$ |\n| $(5)$ | $(6)$ | $(7)$ | $(8)$ | |\n\n- For $n=2$, we have the following minimal Benelux 2-square:\n\n| 3 | 4 | $(1)$ |\n| :---: | :---: | :---: |\n| 6 | 8 | $(2)$ |\n| $(3)$ | $(4)$ | |\n\nSo there exist minimal Benelux $n$-squares only for $n \\in\\{2,4\\}$.\n\n\n[^0]: Alternative for $n$ even. Another strategy for Bob to win when $n$ is even is to ensure that, before each of Alice's turns, the number of islands connected to the island with the first factory is equal to the number of islands connected to the island with the other factory. Let us say that the country is balanced when this is the case. Remark that the country is balanced at the beginning of the game. Let us show that if the country is balanced before some turn of Alice and if she constructs a bridge without losing, then Bob can always play without losing and such that the country remains balanced. There are two different choices that Alice can make:\n\n - Alice builds a bridge between an island connected to a factory and an island which is not connected to anything. Then, since $n$ is even and as the country was balanced before Alice's turn, there exists at least one island $I$ which is still not connected to anything. Bob can therefore simply build a bridge between $I$ and an island connected to the other factory. The country will then be balanced again.\n - Alice builds a bridge between two islands connected to the same factory. We claim that, in this case, is is always possible for Bob to build a bridge between two islands connected to the same factory (so that the country remains balanced). Indeed, the only situation where Bob could not do so is the situation where all $k$ islands connected to the first factory are connected to each other and all $k$ islands connected to the second factory are connected to each other. But there are $2 \\cdot\\left(\\begin{array}{l}k \\\\ 2\\end{array}\\right)$ bridges in such a situation, and so it cannot occur after Alice's turn.", "metadata": {"resource_path": "Benelux_MO/segmented/Benelux_en-olympiad_en-bxmo-problems-2017-zz.jsonl"}}