Discord

Checklist VsOSh AI 2026 Final Stage, Tour 2 (practical) · A task

What to Watch?

Russian title: Что посмотреть?

Implement three exactly specified rules that pick one of five candidate films for each recommendation query.

  • Tabular
  • Rule-based recommendation (data processing), three subtasks
  • Russian original · English translation

The task

An online cinema must recommend one film out of five candidates per query; each query has a user_id, a query_type (the selection rule) and candidates c1–c5. The data comprise queries, items (genre, duration), user events (open, finish, like), item metadata with actor lists, and user sessions (paths of consecutively watched films).

A1 (favorite_genre): choose the candidate whose genre has the largest sum of the user's event weights (open = 1, finish = 2, like = 3) over films of that genre; ties by shorter duration, then smaller item_id. A2 (actor_match): choose the candidate sharing the most actors with the films the user finished or liked; ties by smaller item_id. A3 (next_in_session): score each candidate f₂ by the number of consecutive pairs f₁ → f₂ in the user's session paths where the user has ever finished f₁; ties by smaller item_id.

Abridged and translated by SOTA from the official Russian materials. The official statement has the exact rules, and it wins wherever this summary differs.

In English

This task was published in Russian. SOTA translated its 4 files into English on 17 September 2026.

Read the task statement in English 750 words

What to Watch?

English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email [email protected].

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

Statement

In an online cinema, a user needs to be recommended one film out of several possible options.

For this, the system selects five candidate films for the user and sets a rule by which one of them must be chosen. We will call such a selection task a query.

Each query is described by the following data:

  • user_id: the user identifier;
  • query_type: the query type, that is, the selection rule;
  • c1c_1, c2c_2, c3c_3, c4c_4, c5c_5: the identifiers of five different candidate films.

Each row of the file queries_A.csv specifies one query: for the given user, one of the five proposed films must be chosen.

For each query, you need to output the item_id of the chosen film.

Input format

Use the files attached to the task:

  1. queries_A.csv
  2. items_A.csv
  3. events_A.csv
  4. item_meta_A.json
  5. sessions_A.json

Notes

The task comes with the file baseline_A.ipynb, which contains an example of reading the input files, filtering the queries by type for each subtask, and a detailed description of the data.

Output format

You need to output a CSV file with the header

query_id,item_id

For each query_id belonging to the corresponding subtask, the answer must contain exactly one row. There must be no extra rows.

Scoring

The maximum score for each subtask is 20.

A solution is considered correct if, for each query_id belonging to the corresponding subtask, the correct item_id according to the rules of the task is given.

The final score for the task is based on the best submission.

A1. Subtask 1

When solving this subtask, filter the rows of queries_A.csv, keeping only the queries of type favorite_genre, and output answers only for them.

For a favorite_genre query, the genre of each of the five candidates is taken, and then, for this genre, the sum of the weights of all events of the given user on films of the same genre is computed, where

  • open = 1
  • finish = 2
  • like = 3

The candidate for whose genre this sum is the largest is chosen.

In case of a tie:

  1. the film with the smaller duration;
  2. the film with the smaller item_id.

A2. Subtask 2

When solving this subtask, filter the rows of queries.csv, keeping only the queries of type actor_match, and output answers only for them.

For each actor_match query, the set watched_actors is formed from the actors of the films that the user

  1. Either watched: finish;
  2. Or marked as liked: like.

Only the actors from the actors field of the file item_meta_A.json are considered.

If the actors field is missing, it should be treated as an empty list.

For a candidate, score equals the number of common elements of the sets:

the set of actors of this candidate; the set watched_actors.

In case of a tie, the film with the smallest item_id is chosen.

A3. Subtask 3

When solving this subtask, filter the rows of queries_A.csv, keeping only the queries of type next_in_session, and output answers only for them.

For the user, consider all adjacent pairs of films f1f2f_1 \to f_2 extracted from all the path lists in the file sessions_A.json.

If path = [x1,x2,,xk][x_1, x_2, \ldots, x_k], then the following pairs are extracted from it:

x1x2x2x3xk1xk\begin{gathered} x_1 \to x_2 \\ x_2 \to x_3 \\ \vdots \\ x_{k-1} \to x_k \end{gathered}

For a candidate f2f_2, its score is the number of such pairs f1f2f_1 \to f_2 for which the user has ever finished watching the film f1f_1, that is, there is a finish event for it in the file events_A.csv.

Each occurrence of a pair in sessions_A.json is counted separately.

If the user has no suitable pairs, the score of every candidate is taken to be 0.

The candidate with the largest score is chosen.

In case of a tie, the film with the smallest item_id is chosen.

Translated by SOTA. The Russian original is the official version and wins wherever the two differ. The data files and baseline_A.ipynb named in the statement are not included in the PDF. The official solution is the authors' notebook exported to PDF; it is transcribed here with translated comments and messages. If you organise this olympiad and would like the translation removed, email [email protected] and we will take it down.

At a glance

You get
queries_A.csv, items_A.csv, events_A.csv, item_meta_A.json, sessions_A.json, baseline_A.ipynb.
You submit
CSV with header query_id,item_id containing exactly one row for every query of the relevant subtask and no extra rows.
Scoring
Exact correctness per subtask; 20 points for each of A1–A3 (60 in total); the best submission counts.
Format
Final stage, Tour 2 (practical), Moscow, 25 March 2026; grades 9–11; individual; submissions to an online testing system.

Details

Year
2026, Moscow, Russia
Round
Final Stage, Tour 2 (practical) · A task
Language
Russian; English translation by SOTA
License
Not stated by the source