№1. Prove that for some positive integer $n$ the remainder of $3^{n}$ when divided by $2^{n}$ is greater than $10^{2021}$. Solution I. We choose a positive integer $M$ such that $2^{M}>10^{2022}$, and consider the remainder of $3^{M}$ when divided by $2^{M}$ : $$ 3^{M} \equiv r \quad\left(\bmod 2^{M}\right), 010^{2021}$, then $M$ is the desired number. Otherwise we choose the smallest integer $k$ for which $3^{k} r>$ $>10^{2021}$. Then $3^{k} r<10^{2022}<2^{M}$. Since $3^{k+M} \equiv 3^{k} r\left(\bmod 2^{M}\right)$, the remainder of $3^{k+M}$ when divided by $2^{k+M}$ has the form $3^{k} r+2^{M} s$ with some positive integer $s$, and is therefore greater than $10^{2021}$. Solution II. We choose a positive integer $k$ such that $2^{k+2}>10^{2021}$. We are going to determine $v_{2}\left(3^{2^{k}}-1\right)$, i. e. the largest $m$ such that $2^{m}$ divides $3^{2^{k}}-1$. According to well-known lifting the exponent lemma, $$ v_{2}\left(3^{2^{k}}-1\right)=v_{2}\left(3^{2}-1\right)+k-1=k+2 $$ Then the number $n=2^{k}$ satisfies the condition, Indeed, if $r$ is the remainder when $3^{n}$ is divided by $2^{n}$, then $r \equiv 3^{2^{k}}\left(\bmod 2^{2^{k}}\right)$ and therefore $r \equiv 3^{2^{k}}\left(\bmod 2^{k+3}\right)$ (we use the fact that $\left.2^{k} \geq k+3\right)$. Since $2^{k+2}$ divides $r-1$ and $2^{k+3}$ does not, $r \equiv 1+2^{k+2}\left(\bmod 2^{k+3}\right)$, thus $r \geq 1+2^{k+2}>10^{2021}$. Solution III. Choose a positive integer $k$ such that $3^{k}>10^{2021}$, and a positive integer $m$ such that $2^{m}>3^{k}$. There exists a positive integer $T$ such that $3^{T} \equiv 1\left(\bmod 2^{m}\right)$ (we may take, for instance, $T=$ $=2^{m-2}$ ). Then for all positive integral $s$ $$ 3^{k+s T} \equiv 3^{k} \quad\left(\bmod 2^{m}\right) $$ that is, $3^{k+s T}$ leaves the remainder $3^{k}$ after division by $2^{m}$ and, therefore, a remainder not less than $3^{k}>10^{2021}$ after division by any higher power of 2 . Now we can take $n=k+s T$ such that $k+s T>m$. №2. In a convex cyclic hexagon $A B C D E F \quad B C=E F$ and $C D=A F$. Diagonals $A C$ and $B F$ intersect at point $Q$, and diagonals $E C$ and $D F$ intersect at point $P$. Points $R$ and $S$ are marked on the segments $D F$ and $B F$ respectively so that $F R=P D$ and $B Q=F S$. The segments $R Q$ and $P S$ intersect at point $T$. Prove that the line $T C$ bisects the diagonal $D B$. First solution. It follows obviously that $B F \| C E$ and $A C \| D F$. We denote the circumcircles of $\triangle A B Q$ and $\triangle D E P$ by $\omega_{1}$ and $\omega_{2}$, respectively. Note that the lines $A D$ and $B E$ are internal common tangents to $\omega_{1}$ and $\omega_{2}$. Indeed, $\angle B A Q=\angle B E C=\angle E B Q$, i. e., $E B$ is tangent to $\omega_{1}$; the other tangencies are established similarly. Note that $C P F Q$ is a parallelogram. Then $C Q=F P=R D$, that is, $C Q R D$ is also a parallelogram as well as $C P S B$. The lines $B C$ and $D C$ are not parallel to $B D$. Therefore $R Q$ and $P S$ intersect the line $B D$; we denote the intersections by $X$ and $Y$ respectively. It follows that $X$ lies on $\omega_{1}$, since $\angle Q A B=\angle C D B=\angle B X Q$. Similarly, $Y$ lies on $\omega_{2}$. Thus $$ D B \cdot D X=D A^{2}=B E^{2}=B D \cdot B Y $$ hence $D X=B Y$, or $B X=D Y$. Let $T C$ and $B D$ meet at $Z$. Then it follows from $T X \| C D$ and $T Y \| B C$ that $$ \frac{D Z}{D X}=\frac{C Z}{C T}=\frac{B Z}{B Y} $$ which immediately gives $D Z=B Z$. ![](https://cdn.mathpix.com/cropped/2024_06_04_78f60b2a7fcc2ea41eedg-02.jpg?height=853&width=583&top_left_y=1047&top_left_x=742) Note. The equality $B X=D Y$ can be also proved by applying Menelaus theorem to $\triangle B D F$ and the lines $R-Q-X$ and $S-P-Y$. Second solution. We follow the first solution, using $B F \| C E$ and $A C \| D F$ to note that $C P F Q$, $C Q R D$, and $C P S B$ are parallelograms. Let $N$ and $M$ be points on the segments $C Q$ and $R N$ respectively such that $F R N Q$ and $F R M S$ are parallelograms. Then $S M=F R=P D$ and $S M \| P D$, that is, $S M D P$ is also a parallelogram, hence $D M=P S=C B$ and $D M \| C B$, therefore $D M B C$ is a parallelogram, and $C M$ bisects $B D$. It remains to prove that $T, M, C$ are collinear. Applying Menelaus theorem to $\triangle F R Q$ and the line $P-T-S$ (and bearing in mind the parallelograms found above) we have $$ 1=\frac{F P}{P R} \cdot \frac{R T}{T Q} \cdot \frac{Q S}{S F}=\frac{Q C}{C N} \cdot \frac{R T}{T Q} \cdot \frac{N M}{M R} $$ that is, $$ \frac{Q C}{C N} \cdot \frac{R T}{T Q} \cdot \frac{N M}{M R}=1 $$ The collinearity $T, M, C$ follows from (1) immediately by converse Menelaus theorem for $\triangle Q N R$. ![](https://cdn.mathpix.com/cropped/2024_06_04_78f60b2a7fcc2ea41eedg-03.jpg?height=560&width=602&top_left_y=131&top_left_x=727) №3. Let $n \geq 2$ be an integer. Elwyn is given an $n \times n$ table filled with real numbers (each cell of the table contains exactly one number). We define a rook set as a set of $n$ cells of the table situated in $n$ distinct rows as well as in $n$ distinct columns. Assume that, for every rook set, the sum of $n$ numbers in the cells forming the set is nonnegative. By a move, Elwyn chooses a row, a column, and a real number $a$, and then he adds $a$ to each number in the chosen row, and subtracts $a$ from each number in the chosen column (thus, the number at the intersection of the chosen row and column does not change). Prove that Elwyn can perform a sequence of moves so that all numbers in the table become nonnegative. Common remarks. We collect here several definitions and easy observations which will be used in the solutions. A rook set is nonnegative (resp., vanishing) if the sum of the numbers in its cells is nonnegative (resp., zero). An $n \times n$ table filled with real numbers is good (resp., balanced) if every rook set is nonnegative (resp., vanishing). Notice that the sum of numbers in any rook set does not change during Elwyn's moves, so good (balanced) tables remain such after any sequence of moves. Also, notice that the rows and/or columns of the table can be permuted with no effect on the condition of the problem, as well as on the desired result. The proofs of the following two easy propositions can be found in the addendum after Solution 2 . Proposition 1. Assume that $a_{1}, a_{2}, \ldots, a_{n}$ and $b_{1}, b_{2}, \ldots, b_{n}$ are two sequences of real numbers with equal sums. Then Elwyn can perform a sequence of moves resulting in adding $a_{i}$ to all cells in the $i$ th row, and subtracting $b_{j}$ from all numbers in the $j$ th column, for all $i, j=1,2, \ldots, n$. Proposition 2. If an $n \times n$ table $B$ is balanced, then Elwyn can perform several moves on that table getting a table filled with zeros. Solution 1. We start with the following known consequence of Hall's lemma. Lemma. Let $G=(U \sqcup V, E)$ be a bipartite multigraph with parts $U$ and $V$, both of size $n$. Assume that each vertex has degree $k$; then the edges can be partitioned into $k$ perfect matchings. Proof. Induction on $k$; the base case $k=1$ is trivial. To perform the step, it suffices to find one perfect matching in the graph: removing the edges of that matching, we obtain a graph with all degrees equal to $k-1$. The existence of such matching is guaranteed by Hall's lemma. Indeed, let $U^{\prime}$ be any subset of $U$, and let $V^{\prime}$ be the set of vertices adjacent to $U^{\prime}$. Put $u=\left|U^{\prime}\right|$ and $v=\left|V^{\prime}\right|$. The total degree of vertices in $U^{\prime}$ is $k u$. so the total degree of vertices in $V^{\prime}$ is at least $k u$; hence $k u \leq k v$ and therefore $u \leq v$, which establishes the conditions of Hall's lemma. The following claim is the principal step in this solution. Claim. In any good table, one can decrease some numbers so that the table becomes balanced. Proof. Say that a cell in a good table is blocked if it is contained in a vanishing rook set (so, decreasing the number in the cell would break goodness of the table). First, we show that in any good table one can decrease several numbers so that the table remains good, and all its cells become blocked. Consider any cell $c$; let $\epsilon$ be the minimal sum in a rook set containing that cell. Decrease the number in $c$ by $\epsilon$; the obtained table is still good, but now $c$ is blocked. Apply such operation to all cells in the table consecutively; we arrive at a good table all whose cells are blocked. We claim that, in fact, this table is balanced. In the sequel, we use the following correspondence. Let $R$ and $C$ be the sets of rows and columns of the table, respectively. Then each cell corresponds to a pair of the row and the column it is situated in; this pair may be regarded as an edge of a bipartite (multi)graph with parts $R$ and $C$. This way, any rook set corresponds to a perfect matching between those parts. Arguing indirectly, assume that there is a non-vanishing rook set $S=\left\{s_{1}, s_{2}, \ldots, s_{n}\right\}$. Each cell $s_{i}$ is contained in some vanishing rook set $V_{i}$. Now construct a bipartite multigraph $G=(R \sqcup C, E)$, introducing, for each set $V_{i}, n$ edges corresponding to its cells (thus, $G$ contains $n^{2}$ edges some of which may be parallel). Mark each edge with the number in the corresponding cell. Since the sets $V_{i}$ are all vanishing, the sum of all $n^{2}$ marks is zero. Now, remove $n$ edges corresponding to the cells of $S$, to obtain a graph $G^{\prime}$. Since the sum of numbers in the cells of $S$ is positive, the sum of the marks in $G^{\prime}$ is negative. On the other hand, the degree of every vertex in $G^{\prime}$ is $n-1$, so by the Lemma its edges can be partitioned into $n-1$ perfect matchings. At least one of the obtained matchings has negative sum of marks; so this matching corresponds to a rook set with a negative sum. This is impossible in a good table; this contradiction finishes the proof. Back to the problem, let $T$ be Elwyn's table. Applying the Claim, decrease some numbers in it to get a balanced table $B$. By Proposition 2, Elwyn can perform some moves on table $B$ so as to get a table filled with zeros. Applying the same moves to $T$, Elwyn gets a table where all numbers are nonnegative, as required. Solution 2. Say that the badness of a table is the sum of absolute values of all its negative entries. In Step 1, we will show that, whenever the badness of a good table is nonzero, Elwyn can make some moves decreasing the badness. In a (technical) Step 2, we will show that this claim yields the required result. Step 1. Let $r$ be a row containing some negative number. Mark all cells in row $r$ containing negative numbers, and mark all cells in other rows containing nonpositive numbers. Then there is no rook set consisting of marked cells, since that set would not be nonnegative. By König's theorem (which is equivalent to Hall's lemma), for some $a$ and $b$ with $a+ba$ ). As a result, there exists $x>a$ such that the $x$ th left entry in row $r$ is negative (while the chosen columns are still the $b$ rightmost ones). Now, rectangle $P$ formed by the bottom $n-a$ rows and the left $a$ columns contains only positive numbers, as it contains no marked cells, as well as no cells from row $r$. Let $m$ be the minimal number in that rectangle. Let Elwyn add $m$ to all numbers in the first $a$ rows, and subtract $m$ from all numbers in the first $a$ columns. All numbers which decrease after this operation are situated in $P$, so there appear no new cell containing a negative number, and no negative number decreases. Moreover, by our choice, at least one negative number (situated in row $r$ and column $x$ ) increases. Thus, the badness decreases, as desired. Case 2: Row $r$ is not among the a chosen rows. Add row $r$ to the $a$ chosen rows, and increase $a$ by 1 . Notice that the negative numbers in row $r$ are covered by the $b$ chosen columns. As in the previous case, we permute the rows and columns so that the top $a$ rows and the tight $b$ columns are chosen. All negative numbers in row $r$ automatically come to the right $b$ columns. Now the above argument applies verbatim. Step 2. We show that among the tables which Elwyn can obtain (call such tables reachable), there exists a table with the smallest badness. Applying the argument in Step 1 to that table, we get that its badness is zero, which proves the claim of the problem. Notice that the effect of any sequence of Elwyn's moves has the form described in Proposition 1. Moreover, subtraction of some number $\epsilon$ from all the $a_{i}$ and the $b_{i}$ provides no effect on the result. Hence, we may assume that the sums of the $a_{i}$ and of the $b_{i}$ are both zero. Let $t_{i j}$ denote the $(i, j)$ th entry of the initial table $T$. For any two sequences $\mathbf{a}=\left(a_{1}, \ldots, a_{n}\right)$ and $\mathbf{b}=\left(b_{1}, \ldots, b_{n}\right)$ both summing up to zero, denote by $T(\mathbf{a}, \mathbf{b})$ the table obtained from $T$ by adding $a_{i}$ to all numbers in the $i$ th row, and subtracting $b_{j}$ from all numbers in the $j$ th column, for all $i, j=1,2, \ldots, n$; in particular, $T=T(\mathbf{0}, \mathbf{0})$, where $\mathbf{0}=(0,0, \ldots, 0)$. Let $f(\mathbf{a}, \mathbf{b})$ denote the badness of $T(\mathbf{a}, \mathbf{b})$. Clearly, function $f$ is continuous. Now we intend to bound the set of values that make sense to put in sequences a and $\mathbf{b}$. Let $m$ be the maximal number in $T$. Take any $\mathbf{a}$ and $\mathbf{b}$ summing up to zero, such that some $a_{i}$ is smaller than $-M=-(m+b)$. Then there exists an index $j$ with $b_{j} \geq 0$; hence the entry $(i, j)$ in $T(\mathbf{a}, \mathbf{b})$ is $t_{i j}+a_{i}-b_{j}b=f(\mathbf{0}, \mathbf{0})$. So, all pairs of sequences $\mathbf{a}$ and $\mathbf{b}$ satisfying $f(\mathbf{a}, \mathbf{b}) \leq b$ should also satisfy $a_{i} \geq-M$ and $b_{j} \geq-M$, and hence $a_{i} \leq n M$ and $b_{j} \leq n M$ as well (since each of the sequences sums up to zero). Thus, in order to minimize $f(\mathbf{a}, \mathbf{b})$, it suffices to consider only those $\mathbf{a}$ and $\mathbf{b}$ whose entries lie in $[-M, n M]$. Those values form a compact set, so the continuous function $f$ attains the smallest value on that set. Addendum. Say that the price of Elwyn's move is the number $a$ chosen on that move. Proof of Proposition 1. Let Elwyn perform a move of price $a$ to row $i$ and column $j$, and then a move of price $-a$ to row $i^{\prime}$ and the same column $j$. The result will consist in adding $a$ to row $i$ and subtracting $a$ from row $i^{\prime}$. Similar actions can be performed with columns. So, Elwyn may add $\Sigma=a_{1}+\cdots+a_{n}$ to the numbers in the first row and subtract $\Sigma$ from those in the first column, and then distribute those increments and decrements among the rows and columns, using the above argument. Proof of Proposition 2. It is easy to see, using Proposition 1, that Elwyn can vanish all numbers in the first column, as well as all numbers in the first row, except for the last its entry. The resulting table is also balanced; denote the number in its cell $(i, j)$ by $d_{i j}$. For any $i, j>1$ with $j