# Seismically Active Island

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

All-Russian School Olympiad in Informatics 2025–2026, Final Stage<br>
“Artificial Intelligence” profile, Tour 2, Moscow, 25 March 2026<br>
Task B

## Statement

Researchers from a seismological monitoring centre are analysing records of earthquakes on the island of Terramotus. For each event, data were collected at two observation stations located at opposite ends of the island. Each station has two measuring instruments, placed in different parts of the station.

The data were transmitted from the station to the laboratory over two channels: a fibre-optic cable and a wireless link. But the wireless link suffered from interference, and some time points in the data were lost.

Each instrument records 10 quantities every minute for 100 minutes.

To speed up the analysis of the archive, the researchers brought in an AI agent. The researchers wrote the prompt carelessly and gave the agent too many permissions. Then, in the course of its work, the agent for some reason renamed all the files. After that, it became unclear to the researchers which records belong to the same earthquake: the files are mixed up, and the original grouping is lost. The researchers panicked, but then pulled themselves together and turned for help to Oleg, a school student and an expert in machine learning. Help him cluster the data and repair the consequences of uncontrolled experiments with AI.

It is known that each earthquake corresponds to exactly 8 observations: 2 instruments at each of the 2 stations, and 2 transmission methods for each. You need to work out which observations belong to the same earthquake.

## Input format

The following files are attached to the task:

- `data_B.npy`, containing an array of observations of size $240 \times 10 \times 100$: 240 observations of 10 values over 100 minutes.
- `baseline_B.ipynb`: a notebook with a baseline solution of the task.
- `submission_B.csv`: an example of the solution to be submitted to the testing system.

## Output format

For checking, you must upload the archive `solution_B.zip`.

The archive must contain:

1. The file `submission_B.csv` with two columns:
   - `ID`: the number of the observation in `data_B.npy`;
   - `target`: the predicted value of the target variable.
2. The file `solution_B.ipynb`: a Jupyter Notebook with your solution.

You may add to the archive additional files needed for your solution to work. The archive must, however, contain exactly one file with the extension `.csv` and exactly one file with the extension `.ipynb`.

## Scoring

You can get up to 60 points for this task.

The data are split into a public and a private part. When you submit `submission_B.csv`, you are shown the result on the **public** part. After the end of the stage, the result will be recomputed on the **private** part. The public and private parts do not overlap.

After the end of the stage, your metric will be converted to a 60-point scale according to the following rule:

- the result of the **baseline solution**, with a value of ARI $\leq X$, is scored **0 points**;
- a result with a value of ARI $\geq Y$ is scored **60 points**;
- if the value of ARI lies between $X$ and $Y$, the number of points is computed by the linear interpolation formula:

$$\text{Score} = 60 \cdot \frac{\text{ARI} - X}{Y - X}.$$

The metric values $X$ and $Y$ will be available in the testing system.

The final score for the task is based on the **last** submission.

## Metric for evaluating the accuracy of the answer

This task uses the **ARI (Adjusted Rand Index)** metric. The more pairs of objects the participant distributes over the clusters correctly (for example, if the two objects are in different clusters and the participant also assigns them to different clusters, OR the two objects are in the same cluster and the participant also assigns them to the same cluster), the higher this metric. *ARI* takes the value 0 for a random partition into clusters and the value 1 for a perfectly correct partition, and it can take negative values for a partition that is worse than random.

Example of computing the **ARI** metric in 'Python':

```python
from sklearn.metrics import adjusted_rand_score

labels_true = [0, 0, 1, 1, 2, 2]
labels_pred = [1, 1, 0, 0, 2, 2]

ari = adjusted_rand_score(labels_true, labels_pred)
print("ARI =", ari)
```
