{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "A4. Let $a_{0}, a_{1}, a_{2}, \\ldots$ be a sequence of real numbers such that $a_{0}=0, a_{1}=1$, and for every $n \\geqslant 2$ there exists $1 \\leqslant k \\leqslant n$ satisfying\n\n$$\na_{n}=\frac{a_{n-1}+\\cdots+a_{n-k}}{k}$$\n\nFind the maximal possible value of $a_{2018}-a_{2017}$."}], "ideal": "[$\frac{2016}{2017^{2}}$]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "A7. Find the maximal value of\n\n$$S=\\sqrt[3]{\frac{a}{b+7}}+\\sqrt[3]{\frac{b}{c+7}}+\\sqrt[3]{\frac{c}{d+7}}+\\sqrt[3]{\frac{d}{a+7}}$$\n\nwhere $a, b, c, d$ are nonnegative real numbers which satisfy $a+b+c+d=100$."}], "ideal": "[$\frac{8}{\\sqrt[3]{7}}$]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "C4. An anti-Pascal pyramid is a finite set of numbers, placed in a triangle-shaped array so that the first row of the array contains one number, the second row contains two numbers, the third row contains three numbers and so on; and, except for the numbers in the bottom row, each number equals the absolute value of the difference of the two numbers below it. For instance, the triangle below is an anti-Pascal pyramid with four rows, in which every integer from 1 to $1+2+3+4=10$ occurs exactly once:\n\n$$\begin{array}{cccc} & & 4 \\& 2 & 6 \\& 5 & 7 & 1 \\ 8 & 3 & 10 & 9\\end{array}$$\n\nIs it possible to form an anti-Pascal pyramid with 2018 rows, using every integer from 1 to $1+2+\\cdots+2018$ exactly once?"}], "ideal": "[no]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "N5. Four positive integers $x, y, z$, and $t$ satisfy the relations\n\n\begin{equation*}x y-z t=x+y=z+t \tag{*}\\end{equation*}\n\nIs it possible that both $x y$ and $z t$ are perfect squares?"}], "ideal": "[no]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "C7. There are 60 empty boxes $B_{1},\\ldots, B_{60}$ in a row on a table and an unlimited supply of pebbles. Given a positive integer $n$, Alice and Bob play the following game.\n\nIn the first round, Alice takes $n$ pebbles and distributes them into the 60 boxes as she wishes. Each subsequent round consists of two steps:\n\n(a) Bob chooses an integer $k$ with $1\\leqslant k\\leqslant 59$ and splits the boxes into the two groups $B_{1},\\ldots, B_{k}$ and $B_{k+1},\\ldots, B_{60}$.\n\n(b) Alice picks one of these two groups, adds one pebble to each box in that group, and removes one pebble from each box in the other group.\n\nBob wins if, at the end of any round, some box contains no pebbles. Find the smallest $n$ such that Alice can prevent Bob from winning."}], "ideal": "[960]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "A2. Let $\\mathcal{A}$ denote the set of all polynomials in three variables $x, y, z$ with integer coefficients. Let $\\mathcal{B}$ denote the subset of $\\mathcal{A}$ formed by all polynomials which can be expressed as\n\n$$(x+y+z) P(x, y, z)+(x y+y z+z x) Q(x, y, z)+x y z R(x, y, z)$$\n\nwith $P, Q, R \\in \\mathcal{A}$. Find the smallest non-negative integer $n$ such that $x^{i} y^{j} z^{k} \\in \\mathcal{B}$ for all nonnegative integers $i, j, k$ satisfying $i+j+k \\geqslant n$."}], "ideal": "[4]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "A3. Suppose that $a, b, c, d$ are positive real numbers satisfying $(a+c)(b+d)=a c+b d$. Find the smallest possible value of\n\n$$S=\frac{a}{b}+\frac{b}{c}+\frac{c}{d}+\frac{d}{a}$$"}], "ideal": "[8]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "A5. A magician intends to perform the following trick. She announces a positive integer $n$, along with $2 n$ real numbers $x_{1}<\\ldots<x_{2 n}$, to the audience. A member of the audience then secretly chooses a polynomial $P(x)$ of degree $n$ with real coefficients, computes the $2 n$ values $P\\left(x_{1}\right),\\ldots, P\\left(x_{2 n}\right)$, and writes down these $2 n$ values on the blackboard in non-decreasing order. After that the magician announces the secret polynomial to the audience.\n\nCan the magician find a strategy to perform such a trick?"}], "ideal": "[no]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "C8. Players $A$ and $B$ play a game on a blackboard that initially contains 2020 copies of the number 1. In every round, player $A$ erases two numbers $x$ and $y$ from the blackboard, and then player $B$ writes one of the numbers $x+y$ and $|x-y|$ on the blackboard. The game terminates as soon as, at the end of some round, one of the following holds:\n\n(1) one of the numbers on the blackboard is larger than the sum of all other numbers;\n\n(2) there are only zeros on the blackboard.\n\nPlayer $B$ must then give as many cookies to player $A$ as there are numbers on the blackboard. Player $A$ wants to get as many cookies as possible, whereas player $B$ wants to give as few as possible. Determine the number of cookies that $A$ receives if both players play optimally."}], "ideal": "[7]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "N4a. For any odd prime $p$ and any integer $n$, let $d_{p}(n) \\in\\{0,1,\\ldots, p-1\\}$ denote the remainder when $n$ is divided by $p$. We say that $\\left(a_{0}, a_{1}, a_{2},\\ldots\right)$ is a $p$-sequence, if $a_{0}$ is a positive integer coprime to $p$, and $a_{n+1}=a_{n}+d_{p}\\left(a_{n}\right)$ for $n \\geqslant 0$.\n\nDo there exist infinitely many primes $p$ for which there exist $p$-sequences $\\left(a_{0}, a_{1}, a_{2},\\ldots\right)$ and $\\left(b_{0}, b_{1}, b_{2},\\ldots\right)$ such that $a_{n}>b_{n}$ for infinitely many $n$, and $b_{n}>a_{n}$ for infinitely many $n$?"}], "ideal": "[yes]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "N4b. For any odd prime $p$ and any integer $n$, let $d_{p}(n) \\in\\{0,1,\\ldots, p-1\\}$ denote the remainder when $n$ is divided by $p$. We say that $\\left(a_{0}, a_{1}, a_{2},\\ldots\right)$ is a $p$-sequence, if $a_{0}$ is a positive integer coprime to $p$, and $a_{n+1}=a_{n}+d_{p}\\left(a_{n}\right)$ for $n \\geqslant 0$.\n\nDo there exist infinitely many primes $p$ for which there exist $p$-sequences $\\left(a_{0}, a_{1}, a_{2},\\ldots\right)$ and $\\left(b_{0}, b_{1}, b_{2},\\ldots\right)$ such that $a_{0}<b_{0}$, but $a_{n}>b_{n}$ for all $n \\geqslant 1$?"}], "ideal": "[no]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "N6. For a positive integer $n$, let $d(n)$ be the number of positive divisors of $n$, and let $\\varphi(n)$ be the number of positive integers not exceeding $n$ which are coprime to $n$. Does there exist a constant $C$ such that\n\n$$\frac{\\varphi(d(n))}{d(\\varphi(n))}\\leqslant C$$\n\nfor all $n \\geqslant 1$?"}], "ideal": "[$n=2$]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "C6. A hunter and an invisible rabbit play a game on an infinite square grid. First the hunter fixes a colouring of the cells with finitely many colours. The rabbit then secretly chooses a cell to start in. Every minute, the rabbit reports the colour of its current cell to the hunter, and then secretly moves to an adjacent cell that it has not visited before (two cells are adjacent if they share a side). The hunter wins if after some finite time either\n\n\begin{itemize}  \\item the rabbit cannot move; or\n  \\item the hunter can determine the cell in which the rabbit started.\\end{itemize}\n\nDecide whether there exists a winning strategy for the hunter."}], "ideal": "[yes]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "Determine all integers $n \\geqslant 1$ for which there exists a pair of positive integers $(a, b)$ such that no cube of a prime divides $a^{2}+b+3$ and\n\n$$\frac{a b+3 b+8}{a^{2}+b+3}=n$$"}], "ideal": "[$n=2$]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "A7. For a positive integer $n$ we denote by $s(n)$ the sum of the digits of $n$. Let $P(x)=$ $x^{n}+a_{n-1} x^{n-1}+\\cdots+a_{1} x+a_{0}$ be a polynomial, where $n \\geqslant 2$ and $a_{i}$ is a positive integer for all $0\\leqslant i\\leqslant n-1$. Could it be the case that, for all positive integers $k, s(k)$ and $s(P(k))$ have the same parity?"}], "ideal": "[no]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "C1. A $\\pm 1$-sequence is a sequence of 2022 numbers $a_{1},\\ldots, a_{2022}$, each equal to either +1 or -1 . Determine the largest $C$ so that, for any $\\pm 1$-sequence, there exists an integer $k$ and indices $1\\leqslant t_{1}<\\ldots<t_{k}\\leqslant 2022$ so that $t_{i+1}-t_{i}\\leqslant 2$ for all $i$, and\n\n$$\\left|\\sum_{i=1}^{k} a_{t_{i}}\right|\\geqslant C$$"}], "ideal": "[$C=506$]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "C7. Lucy starts by writing $s$ integer-valued 2022-tuples on a blackboard. After doing that, she can take any two (not necessarily distinct) tuples $\\mathbf{v}=\\left(v_{1},\\ldots, v_{2022}\right)$ and $\\mathbf{w}=\\left(w_{1},\\ldots, w_{2022}\right)$ that she has already written, and apply one of the following operations to obtain a new tuple:\n\n$$\n\begin{aligned}\n& \\mathbf{v}+\\mathbf{w}=\\left(v_{1}+w_{1},\\ldots,v_{2022}+w_{2022}\right) \\& \\mathbf{v} \\vee \\mathbf{w}=\\left(\\max\\left(v_{1}, w_{1}\right),\\ldots, \\max\\left(v_{2022}, w_{2022}\right)\right)\\end{aligned}$$\n\nand then write this tuple on the blackboard.\n\nIt turns out that, in this way, Lucy can write any integer-valued 2022-tuple on the blackboard after finitely many steps. What is the smallest possible number $s$ of tuples that she initially wrote?"}], "ideal": "[$s=3$]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "N1.\n\nA number is called Norwegian if it has three distinct positive divisors whose sum is equal to 2022. Determine the smallest Norwegian number.\n\n(Note: The total number of positive divisors of a Norwegian number is allowed to be larger than 3.)"}], "ideal": "[1344]"}
{"input": [{"role": "system", "content": "You are a gold medalist in International Math Olympiad.\n\nYou are tasked to answer International Math Olympiad questions. The correct answers to all questions can only be '[yes]', '[no]', or a single numeric answer.\n<|start_of_answer|>\nA specific answer (e.g. [$n=42$], [yes], [no], [3.14])\n<|end_of_answer|>. Reason about the problem step by step, but make sure to clearly delineate your answer wrapped in square brackets."}, {"role": "user", "content": "N2.\n\nFind all positive integers $n>2$ such that\n\n$$n ! \\mid \\prod_{\\substack{p<q\\leqslant n, p, q \text { primes }}}(p+q)$$"}], "ideal": "[$n=7$]"}