{"year": "2022", "tier": "T1", "problem_label": "1", "problem_type": null, "exam": "APMO", "problem": "Find all pairs $(a, b)$ of positive integers such that $a^{3}$ is a multiple of $b^{2}$ and $b-1$ is a multiple of $a-1$. Note: An integer $n$ is said to be a multiple of an integer $m$ if there is an integer $k$ such that $n=k m$.", "solution": ".1\n\nBy inspection, we see that the pairs $(a, b)$ with $a=b$ are solutions, and so too are the pairs $(a, 1)$. We will see that these are the only solutions.\n\n- Case 1. Consider the case $b0$. Then $E=\\left(-\\frac{d}{2}, \\frac{a}{2}\\right)$. The general equation of a circle is\n\n$$\nx^{2}+y^{2}+2 f x+2 g y+h=0\n$$\n\nSubstituting the coordinates of $A, D, C$ into (1) and solving for $f, g, h$, we find that the equation of the circumcircle of $\\triangle A D C$ is\n\n$$\nx^{2}+y^{2}+(d-c) x+\\left(\\frac{c d}{a}-a\\right) y-c d=0\n$$\n\nSimilarly, the equation of the circumcircle of $\\triangle B D E$ is\n\n$$\nx^{2}+y^{2}+d x+\\left(\\frac{d^{2}}{2 a}-\\frac{a}{2}\\right) y=0\n$$\n\nThen (3)-(2) gives the equation of the line $D F$ which is\n\n$$\nc x+\\frac{a^{2}+d^{2}-2 c d}{2 a} y+c d=0\n$$\n\nSolving (3) and (4) simultaneously, we get\n\n$$\nF=\\left(\\frac{c\\left(d^{2}-a^{2}-2 c d\\right)}{a^{2}+(d-2 c)^{2}}, \\frac{2 a c(c-d)}{a^{2}+(d-2 c)^{2}}\\right)\n$$\n\nand the other solution $D=(-d, 0)$.\nFrom this we obtain the equation of the line $E F$ which is $a x+(d-2 c) y+a c=0$. It passes through $P(-c, 0)$ which is independent of $d$.", "metadata": {"resource_path": "APMO/segmented/en-apmo2022_sol.jsonl", "problem_match": "\nProblem 2.", "solution_match": "# Solution 2"}} {"year": "2022", "tier": "T1", "problem_label": "3", "problem_type": null, "exam": "APMO", "problem": "Find all positive integers $k<202$ for which there exists a positive integer $n$ such that\n\n$$\n\\left\\{\\frac{n}{202}\\right\\}+\\left\\{\\frac{2 n}{202}\\right\\}+\\cdots+\\left\\{\\frac{k n}{202}\\right\\}=\\frac{k}{2}\n$$\n\nwhere $\\{x\\}$ denote the fractional part of $x$.\nNote: $\\{x\\}$ denotes the real number $k$ with $0 \\leq k<1$ such that $x-k$ is an integer.", "solution": "Denote the equation in the problem statement as $\\left(^{*}\\right)$, and note that it is equivalent to the condition that the average of the remainders when dividing $n, 2 n, \\ldots, k n$ by 202 is 101 . Since $\\left\\{\\frac{i n}{202}\\right\\}$ is invariant in each residue class modulo 202 for each $1 \\leq i \\leq k$, it suffices to consider $0 \\leq n<202$.\n\nIf $n=0$, so is $\\left\\{\\frac{i n}{202}\\right\\}$, meaning that $(*)$ does not hold for any $k$. If $n=101$, then it can be checked that $\\left(^{*}\\right)$ is satisfied if and only if $k=1$. From now on, we will assume that $101 \\nmid n$.\nFor each $1 \\leq i \\leq k$, let $a_{i}=\\left\\lfloor\\frac{i n}{202}\\right\\rfloor=\\frac{i n}{202}-\\left\\{\\frac{i n}{202}\\right\\}$. Rewriting $\\left(^{*}\\right)$ and multiplying the equation by 202, we find that\n\n$$\nn(1+2+\\ldots+k)-202\\left(a_{1}+a_{2}+\\ldots+a_{k}\\right)=101 k\n$$\n\nEquivalently, letting $z=a_{1}+a_{2}+\\ldots+a_{k}$,\n\n$$\nn k(k+1)-404 z=202 k\n$$\n\nSince $n$ is not divisible by 101 , which is prime, it follows that $101 \\mid k(k+1)$. In particular, $101 \\mid k$ or $101 \\mid k+1$. This means that $k \\in\\{100,101,201\\}$. We claim that all these values of $k$ work.\n\n- If $k=201$, we may choose $n=1$. The remainders when dividing $n, 2 n, \\ldots, k n$ by 202 are 1,2 , ..., 201, which have an average of 101 .\n- If $k=100$, we may choose $n=2$. The remainders when dividing $n, 2 n, \\ldots, k n$ by 202 are 2,4 , ..., 200, which have an average of 101.\n- If $k=101$, we may choose $n=51$. To see this, note that the first four remainders are $51,102,153$, 2 , which have an average of 77 . The next four remainders $(53,104,155,4)$ are shifted upwards from the first four remainders by 2 each, and so on, until the 25 th set of the remainders ( 99 , $150,201,50)$ which have an average of 125 . Hence, the first 100 remainders have an average of $\\frac{77+125}{2}=101$. The 101th remainder is also 101 , meaning that the average of all 101 remainders is 101 .\n\nIn conclusion, all values $k \\in\\{1,100,101,201\\}$ satisfy the initial condition.", "metadata": {"resource_path": "APMO/segmented/en-apmo2022_sol.jsonl", "problem_match": "\nProblem 3.", "solution_match": "# Solution\n\n"}} {"year": "2022", "tier": "T1", "problem_label": "4", "problem_type": null, "exam": "APMO", "problem": "Let $n$ and $k$ be positive integers. Cathy is playing the following game. There are $n$ marbles and $k$ boxes, with the marbles labelled 1 to $n$. Initially, all marbles are placed inside one box. Each turn, Cathy chooses a box and then moves the marbles with the smallest label, say $i$, to either any empty box or the box containing marble $i+1$. Cathy wins if at any point there is a box containing only marble $n$.\nDetermine all pairs of integers $(n, k)$ such that Cathy can win this game.", "solution": "We claim Cathy can win if and only if $n \\leq 2^{k-1}$.\n\nFirst, note that each non-empty box always contains a consecutive sequence of labeled marbles. This is true since Cathy is always either removing from or placing in the lowest marble in a box. As a consequence, every move made is reversible.\n\nNext, we prove by induction that Cathy can win if $n=2^{k-1}$. The base case of $n=k=1$ is trivial. Assume a victory can be obtained for $m$ boxes and $2^{m-1}$ marbles. Consider the case of $m+1$ boxes and $2^{m}$ marbles. Cathy can first perform a sequence of moves so that only marbles $2^{m-1}, \\ldots, 2^{m}$ are left in the starting box, while keeping one box, say $B$, empty. Now move the marble $2^{m-1}$ to box $B$, then reverse all of the initial moves while treating $B$ as the starting box. At the end of that, we will have marbles $2^{m-1}+1, \\ldots, 2^{m}$ in the starting box, marbles $1,2, \\ldots, 2^{m-1}$ in box $B$, and $m-1$ empty boxes. By repeating the original sequence of moves on marbles $2^{m-1}+1, \\ldots, 2^{m}$, using the $m$ boxes that are not box $B$, we can reach a state where only marble $2^{m}$ remains in the starting box. Therefore\na victory is possible if $n=2^{k-1}$ or smaller.\n\nWe now prove by induction that Cathy loses if $n=2^{k-1}+1$. The base case of $n=2$ and $k=1$ is trivial. Assume a victory is impossible for $m$ boxes and $2^{m-1}+1$ marbles. For the sake of contradiction, suppose that victory is possible for $m+1$ boxes and $2^{m}+1$ marbles. In a winning sequence of moves, consider the last time a marble $2^{m-1}+1$ leaves the starting box, call this move $X$. After $X$, there cannot be a time when marbles $1, \\ldots, 2^{m-1}+1$ are all in the same box. Otherwise, by reversing these moves after $X$ and deleting marbles greater than $2^{m-1}+1$, it gives us a winning sequence of moves for $2^{m-1}+1$ marbles and $m$ boxes (as the original starting box is not used here), contradicting the inductive hypothesis. Hence starting from $X$, marbles 1 will never be in the same box as any marbles greater than or equal to $2^{m-1}+1$.\n\nNow delete marbles $2, \\ldots, 2^{m-1}$ and consider the winning moves starting from $X$. Marble 1 would only move from one empty box to another, while blocking other marbles from entering its box. Thus we effectively have a sequence of moves for $2^{m-1}+1$ marbles, while only able to use $m$ boxes. This again contradicts the inductive hypothesis. Therefore, a victory is not possible if $n=2^{k-1}+1$ or greater.", "metadata": {"resource_path": "APMO/segmented/en-apmo2022_sol.jsonl", "problem_match": "\nProblem 4.", "solution_match": "# Solution\n\n"}} {"year": "2022", "tier": "T1", "problem_label": "5", "problem_type": null, "exam": "APMO", "problem": "Let $a, b, c, d$ be real numbers such that $a^{2}+b^{2}+c^{2}+d^{2}=1$. Determine the minimum value of $(a-b)(b-c)(c-d)(d-a)$ and determine all values of $(a, b, c, d)$ such that the minimum value is achieved.", "solution": "The minimum value is $-\\frac{1}{8}$. There are eight equality cases in total. The first one is\n\n$$\n\\left(\\frac{1}{4}+\\frac{\\sqrt{3}}{4},-\\frac{1}{4}-\\frac{\\sqrt{3}}{4}, \\frac{1}{4}-\\frac{\\sqrt{3}}{4},-\\frac{1}{4}+\\frac{\\sqrt{3}}{4}\\right) .\n$$\n\nCyclic shifting all the entries give three more quadruples. Moreover, flipping the sign $((a, b, c, d) \\rightarrow$ $(-a,-b,-c,-d))$ all four entries in each of the four quadruples give four more equality cases.", "metadata": {"resource_path": "APMO/segmented/en-apmo2022_sol.jsonl", "problem_match": "\nProblem 5.", "solution_match": "# Solution\n\n"}} {"year": "2022", "tier": "T1", "problem_label": "5", "problem_type": null, "exam": "APMO", "problem": "Let $a, b, c, d$ be real numbers such that $a^{2}+b^{2}+c^{2}+d^{2}=1$. Determine the minimum value of $(a-b)(b-c)(c-d)(d-a)$ and determine all values of $(a, b, c, d)$ such that the minimum value is achieved.", "solution": ".1\n\nSince the expression is cyclic, we could WLOG $a=\\max \\{a, b, c, d\\}$. Let\n\n$$\nS(a, b, c, d)=(a-b)(b-c)(c-d)(d-a)\n$$\n\nNote that we have given $(a, b, c, d)$ such that $S(a, b, c, d)=-\\frac{1}{8}$. Therefore, to prove that $S(a, b, c, d) \\geq$ $-\\frac{1}{8}$, we just need to consider the case where $S(a, b, c, d)<0$.\n\n- Exactly 1 of $a-b, b-c, c-d, d-a$ is negative.\n\nSince $a=\\max \\{a, b, c, d\\}$, then we must have $d-a<0$. This forces $a>b>c>d$. Now, let us write\n\n$$\nS(a, b, c, d)=-(a-b)(b-c)(c-d)(a-d)\n$$\n\nWrite $a-b=y, b-c=x, c-d=w$ for some positive reals $w, x, y>0$. Plugging to the original condition, we have\n\n$$\n(d+w+x+y)^{2}+(d+w+x)^{2}+(d+w)^{2}+d^{2}-1=0(*)\n$$\n\nand we want to prove that $w x y(w+x+y) \\leq \\frac{1}{8}$. Consider the expression $(*)$ as a quadratic in $d$ :\n\n$$\n4 d^{2}+d(6 w+4 x+2 y)+\\left((w+x+y)^{2}+(w+x)^{2}+w^{2}-1\\right)=0\n$$\n\nSince $d$ is a real number, then the discriminant of the given equation has to be non-negative, i.e. we must have\n\n$$\n\\begin{aligned}\n4 & \\geq 4\\left((w+x+y)^{2}+(w+x)^{2}+w^{2}\\right)-(3 w+2 x+y)^{2} \\\\\n& =\\left(3 w^{2}+2 w y+3 y^{2}\\right)+4 x(w+x+y) \\\\\n& \\geq 8 w y+4 x(w+x+y) \\\\\n& =4(x(w+x+y)+2 w y)\n\\end{aligned}\n$$\n\nHowever, AM-GM gives us\n\n$$\nw x y(w+x+y) \\leq \\frac{1}{2}\\left(\\frac{x(w+x+y)+2 w y}{2}\\right)^{2} \\leq \\frac{1}{8}\n$$\n\nThis proves $S(a, b, c, d) \\geq-\\frac{1}{8}$ for any $a, b, c, d \\in \\mathbb{R}$ such that $a>b>c>d$. Equality holds if and only if $w=y, x(w+x+y)=2 w y$ and $w x y(w+x+y)=\\frac{1}{8}$. Solving these equations gives us $w^{4}=\\frac{1}{16}$ which forces $w=\\frac{1}{2}$ since $w>0$. Solving for $x$ gives us $x(x+1)=\\frac{1}{2}$, and we will get $x=-\\frac{1}{2}+\\frac{\\sqrt{3}}{2}$ as $x>0$. Plugging back gives us $d=-\\frac{1}{4}-\\frac{\\sqrt{3}}{4}$, and this gives us\n\n$$\n(a, b, c, d)=\\left(\\frac{1}{4}+\\frac{\\sqrt{3}}{4},-\\frac{1}{4}+\\frac{\\sqrt{3}}{4}, \\frac{1}{4}-\\frac{\\sqrt{3}}{4},-\\frac{1}{4}-\\frac{\\sqrt{3}}{4}\\right)\n$$\n\nThus, any cyclic permutation of the above solution will achieve the minimum equality.\n\n- Exactly 3 of $a-b, b-c, c-d, d-a$ are negative Since $a=\\max \\{a, b, c, d\\}$, then $a-b$ has to be positive. So we must have $bd>c>b$. By the previous case, $S(a, d, c, b) \\geq-\\frac{1}{8}$, which implies that\n\n$$\nS(a, b, c, d)=S(a, d, c, b) \\geq-\\frac{1}{8}\n$$\n\nas well. Equality holds if and only if\n\n$$\n(a, b, c, d)=\\left(\\frac{1}{4}+\\frac{\\sqrt{3}}{4},-\\frac{1}{4}-\\frac{\\sqrt{3}}{4}, \\frac{1}{4}-\\frac{\\sqrt{3}}{4},-\\frac{1}{4}+\\frac{\\sqrt{3}}{4}\\right)\n$$\n\nand its cyclic permutation.", "metadata": {"resource_path": "APMO/segmented/en-apmo2022_sol.jsonl", "problem_match": "\nProblem 5.", "solution_match": "# Solution 5"}} {"year": "2022", "tier": "T1", "problem_label": "5", "problem_type": null, "exam": "APMO", "problem": "Let $a, b, c, d$ be real numbers such that $a^{2}+b^{2}+c^{2}+d^{2}=1$. Determine the minimum value of $(a-b)(b-c)(c-d)(d-a)$ and determine all values of $(a, b, c, d)$ such that the minimum value is achieved.", "solution": ".2\n\nThe minimum value is $-\\frac{1}{8}$. There are eight equality cases in total. The first one is\n\n$$\n\\left(\\frac{1}{4}+\\frac{\\sqrt{3}}{4},-\\frac{1}{4}-\\frac{\\sqrt{3}}{4}, \\frac{1}{4}-\\frac{\\sqrt{3}}{4},-\\frac{1}{4}+\\frac{\\sqrt{3}}{4}\\right) .\n$$\n\nCyclic shifting all the entries give three more quadruples. Moreover, flipping the sign $((a, b, c, d) \\rightarrow$ $(-a,-b,-c,-d)$ ) all four entries in each of the four quadruples give four more equality cases. We then begin the proof by the following optimization:\n\nClaim 1. In order to get the minimum value, we must have $a+b+c+d=0$.\n\nProof. Assume not, let $\\delta=\\frac{a+b+c+d}{4}$ and note that\n\n$$\n(a-\\delta)^{2}+(b-\\delta)^{2}+(c-\\delta)^{2}+(d-\\delta)^{2}