# School Stage (Moscow) of the All-Russian School Olympiad 2025/26 in Artificial Intelligence, Grades 9–11: Tasks

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Original: [tasks-ai-9-11-sch-msk-25-26.pdf](https://vos.olimpiada.ru/upload/files/Arhive_tasks/2025-26/school/ai/tasks-ai-9-11-sch-msk-25-26.pdf). Running header on every page: "Tasks of the school stage of the VsOSh 2025/26 in artificial intelligence — grades 9–11".*

*Translator's note: this paper states only the total; the points for each task are given in the official solutions (12 points for Tasks 1–5 and 8, 20 points for Task 6; none are stated for Task 7).*

**Maximum score for the olympiad — 112**

## Task 1

Let $k \geq 2$ be an integer. We say that two points on the number line are friends if the difference of their coordinates is divisible by $k$. A non-empty set of points is called a cluster if any two points in this set are friends and no point can be added to it so that this property is preserved.

For which integers $k \geq 2$ can the points of the number line with coordinates

$$
1,\ 7,\ 21,\ 22,\ 28,\ 42,\ 43,\ 49,\ 63
$$

be split into two clusters?

## Task 2

Petya has thought of two natural numbers $a$ and $b$. Vasya is trying to guess them by asking questions. A question from Vasya consists of him naming two natural numbers $x$ and $y$. In reply to a question, Petya reports two numbers $z < t$, one of which is equal to $ax + by$ (he does not say which one).

Vasya asked two questions: for $x = 4$ and $y = 1$, Petya replied 14 and 15; for $x = 1$ and $y = 4$, Petya replied 9 and 11. Which numbers did Petya think of?

## Task 3

A nature reserve plans to introduce automatic monitoring of rare *pink lemurs*. To test the system, a group of 100 animals was selected, in which 10% are pink lemurs (class 1) and the remaining 90% are ordinary lemurs (class 0). We will call this group the *test set*.

For each individual in the test set, AI models made a prediction of which class (0 or 1) that lemur belongs to. To assess the quality of recognition, we introduce the following standard notation:

- $TP$. Predicted class (1), actual class (1).
- $FP$. Predicted class (1), actual class (0).
- $TN$. Predicted class (0), actual class (0).
- $FN$. Predicted class (0), actual class (1).

In total, the test set contains $P = TP + FN$ objects (lemurs) of class 1 and $N = TN + FP$ objects of class 0.

Four AI models (A, B, C and D) recognised the lemurs from the test set. Model A assigned all lemurs to class 0, and model B assigned all lemurs to class 1. Data on the performance of models C and D are given in the table below.

| Model | TP | FP | TN | FN |
|:---:|:---:|:---:|:---:|:---:|
| C | 7 | 8 | 82 | 3 |
| D | 8 | 14 | 76 | 2 |

For models A, B, C, D, we compute the following five *metrics* $M_1, M_2, M_3, M_4, M_5$ (if a division by zero occurs for some model, the corresponding metric is not computed for it).

$$
\begin{aligned}
M_1 &= \frac{TP + TN}{P + N} && \text{(overall accuracy)},\\
M_2 &= \frac{TP}{TP + FN} && \text{(correct on class 1)},\\
M_3 &= \frac{TN}{TN + FP} && \text{(correct on class 0)},\\
M_4 &= \tfrac{1}{2}\,(M_2 + M_3) && \text{(balanced accuracy)},\\
M_5 &= \frac{TP}{TP + FP} && \text{(precision on predictions of 1)}.
\end{aligned}
$$

For each of the metrics $M_1, M_2, \ldots, M_5$, determine for which of the models its maximum value is attained.

## Task 4

Vasya was testing a model with real parameters $x$ and $y$. He found out that the loss function is given by the formula

$$
\mathcal{L}(x, y) = x^4 + y^2 + 2x^2y + 4y + 6x^2 - 4x + 14.
$$

Help Vasya determine the values of the parameters $(x^*, y^*)$ for which the value of the loss function is smallest. In your answer, give $x^*$, $y^*$ and the value $\mathcal{L}(x^*, y^*)$.

## Task 5

There is a set of training examples: $N$ examples in total, of which exactly two are positive and the rest are negative. A group of 4 examples is chosen at random. It is known that the probability that the group contains both positive examples is 2 times the probability that it contains no positive example at all. Find all possible values of $N$.

## Task 6

**Neural network training report** · standard input · standard output · 1 second · 256 megabytes

*Translator's note: in the original, this line is printed run together, without labels. It gives the task title, then "standard input", "standard output", "1 second" and "256 megabytes", i.e. the input file, output file, time limit and memory limit.*

Neural network training is usually divided into epochs. During one epoch of training, the model passes through the training dataset once.

Dima worked on a new project for a long time. Its training took as many as $n$ epochs. After each epoch, Dima wrote down the current time in the format $HH:MM$ (for example, $13:03$). Now Dima wonders what the minimum amount of time spent on training the model could have been.

Dima is very busy with work tasks at the moment, so he has turned to you for help. Compute the minimum amount of time that could have been spent on training the model.

### Input format

The first line of the input contains one integer $n$ ($2 \le n \le 10^4$).

The next $n$ lines give the moments of time at which each successive epoch ended, in the format $HH:MM$ (24-hour format).

### Output format

Output one integer: the minimum number of minutes that could have been spent on training the model. Round the answer down to the nearest whole number of minutes.

### Note

In the first test example, exactly 10 full hours passed $(14 - 24)$. There were also 56 minutes from $13:03$ to $14:00$ (not 57, because $13:03$ could have been $13:03:59$). And another 15 minutes passed from $00:00$ to $00:15$. In total, $10 \cdot 60 + 56 + 15 = 671$.

*Translator's note: the paper does not print the test examples that this note refers to.*

## Task 7

**Special decision tree**

Input file name: standard input<br>
Output file name: standard output<br>
Time limit: 1 second<br>
Memory limit: 256 megabytes

You are given a complete binary decision tree of depth $n$. Exactly $n$ steps are taken from the root to a leaf. At each step, one of two decisions is made: go left or go right. Initially, both options are equally likely: each edge has probability $1/2$.

Someone modified the tree and changed two edge probabilities to 0:

- the first edge is the $a$-th edge on the "always left" path (the edge between levels $a - 1$ and $a$ if you choose left at every step from the root);
- the second edge is the $b$-th edge on the "always right" path (the edge between levels $b - 1$ and $b$ if you choose right at every step from the root).

All the other edges still have probability $1/2$ (except for the edges that have lost their neighbouring edge: their probability is now equal to one).

The outcomes in this tree are its leaves (the vertices on the very bottom level). The probability of each outcome is the product of the probabilities along the path to the corresponding leaf.

You need to determine how many different outcomes (leaves of the tree) still have **non-zero** probability.

### Input format

The only line contains three integers $n$, $a$, $b$ ($1 \le n \le 60$, $1 \le a, b \le n$).

### Output format

Output one integer: the number of leaves that remain reachable (that is, that correspond to paths of non-zero probability).

### Note

*[Figure: see page 3 of the [original PDF](https://vos.olimpiada.ru/upload/files/Arhive_tasks/2025-26/school/ai/tasks-ai-9-11-sch-msk-25-26.pdf#page=3). Transcription: a complete binary tree of depth 3 in which the edge from the root to its right child and the edge from the root's left child to its own left child are crossed out in red. Of the eight leaves, the third and fourth from the left are green (reachable); the other six are red and marked with a cross.]*

In the first test example, only 2 outcomes remain reachable.

*Translator's note: the paper does not print the test examples themselves.*

## Task 8

Using three machine learning models $a_1, a_2, a_3$, we want to distinguish photographs of dogs (class 0) from photographs of cats (class 1). To evaluate the quality of the models, we ran them on a set of images for which the correct answer is known.

In the table (XLSX format, CSV format), each row contains four numbers: column $y$ gives the correct class, and columns $a_1, a_2, a_3$ give the answers of the three models. All the numbers are equal to 0 or 1.

*Translator's note: the PDF contains no links to the data files named here.*

The models are trusted to different degrees; the weights are set as follows:

$$
w_1 = 2, \qquad w_2 = 1, \qquad w_3 = 3.
$$

For each row, the weighted sum is computed:

$$
S = w_1 \cdot a_1 + w_2 \cdot a_2 + w_3 \cdot a_3.
$$

The final answer is $\hat{y} = 1$ if $S \geq 3$, and $\hat{y} = 0$ otherwise.

Find the number of rows in which the final answer $\hat{y}$ matches the correct answer $y$. Give only this number as your answer.
