Discord

Checklist VsOSh AI 2026 Regional Stage, Tour 2 (data analysis and machine learning) · A task

Recommendation Islands

Russian title: Острова рекомендаций

Answer five data-analysis questions about a marketplace catalogue and its "also viewed" recommendation graph.

  • Tabular
  • Data analysis with pandas and graph traversal (five questions)
  • Russian original · English translation

The task

A marketplace analyst receives items.csv (item_id, category among phones, accessories, laptops, books, home and toys; price; rating from 3.0 to 5.0; brand; in_stock) and also_viewed.csv (pairs item_from, item_to), where a pair links two items in both directions.

A1: count in-stock phones with rating ≥ 4.5. A2: the brand with the highest mean laptop price. A3: segment items into premium (rating ≥ 4.5 and price ≥ 50000), standard (rating ≥ 4.0 and price < 50000) and budget, and count in-stock premium items. A4: for every category, the number of distinct items that appear in item_to (a CSV sorted by category, including zero counts). A5: the number of connected components ("recommendation islands") containing at least one phone and at least one accessory.

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 3 files into English on 16 September 2026. Only the words changed in the notebooks: markdown, code comments, messages and printed output. The code, file names and paths are the original's, so a translated notebook runs with the original data.

Read the task statement in English 1019 words

Recommendation Islands

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, Regional Stage, Grades 9–11
“Artificial Intelligence” profile, Tour 2, 19 January 2026
Task A

Points for the task: 100, 20 for each question
Answer submission format: entering the answer or uploading a file, depending on the question
Number of attempts: 10 for each subtask
Submission that counts: the last one

Statement

You work as an analyst in the team of an online marketplace. On the website, each product has a card with information (category, price, rating, brand, availability) and a “Customers also viewed” block, which shows other products that users often go to from this card.

You have been given an export of two tables in CSV format:

  • items.csv — a list of products and their properties.
  • also_viewed.csv — a list of “customers also viewed” transitions.

You need to answer several questions about the products and the structure of the recommendation graph. The answers must be obtained by processing the data programmatically (for example, in Python using pandas and simple graph algorithms).

The file items.csv contains information about the products. Each row is one product. Fields:

  • item_id – a unique integer identifier of the product.
  • category – the product category (phones, accessories, laptops, books, home, toys).
  • price – the price of the product in conventional units (an integer).
  • rating – the rating of the product according to reviews (a real number from 3.0 to 5.0 in steps of 0.1).
  • brand – the brand name (a string).
  • in_stock – 1 if the product is in stock, 0 if it is not.

The file also_viewed.csv describes the links between products in the “customers also viewed” block. Each row specifies a pair of products (item_from, item_to) for which it has been recorded that users often go from one to the other. In the tasks that refer to the “neighbours” of a product or to transitions between products, we assume that such a link works in both directions: if the table contains a row with the pair of products AA and BB (in any order), then AA and BB are considered directly linked recommendations. The “neighbours” of a product XX are all the products that are paired with XX in at least one row, regardless of whether XX is given in item_from or in item_to.

Scoring

You can get up to 100 points for this task. Each item is worth 20 points.

Test results for subtasks 1, 2, 3 and 5 are not available during the tour. In all subtasks, the last submission counts.


A1 – Question 1

How many products in the category phones have a rating of at least 4.5 (rating 4.5\ge 4.5) and are also in stock (in_stock =1= 1)?

Output format

One integer – the number of such products.

Answer evaluation metric

Exact match of the entered answer.


A2 – Question 2

Consider only the products in the category laptops. For each brand, compute the average price of that brand's laptops. Which brand has the highest average price among the laptops?

If several brands have the same highest average price, you may output any of them.

Output format

One word – the brand name (the brand string from the file items.csv).

Answer evaluation metric

Exact match of the entered answer.


A3 – Question 3

The marketing team wants to divide the products into three segments by price and rating:

  • segment premium – if rating 4.5\ge 4.5 and price 50000\ge 50000;
  • segment standard – if rating 4.0\ge 4.0 and price <50000< 50000;
  • segment budget – in all other cases.

For each product, determine its segment (premium / standard / budget) according to these rules. Among the products that are in stock (in_stock =1= 1), count how many products belong to the segment premium.

Output format

One integer — the number of products in the segment premium among the products with in_stock =1= 1.

Answer evaluation metric

Exact match of the entered answer.


A4 – Question 4

Consider the file also_viewed.csv. Find all the products that appear at least once in the field item_to (that is, the products that were shown at least once in the “Customers also viewed” block). For each category, count how many distinct products of that category appear in item_to at least once.

You need to prepare a table with two columns:

  • category – the name of the category;
  • cnt – the number of distinct products of this category that appear in item_to.

The table should include all the categories that are present in the file items.csv, even if cnt =0= 0 for some category. The rows of the table must be sorted by category name in alphabetical order.

Output format

A text file answer4.csv in CSV format with a header and two columns:

category,cnt

The file must contain exactly one row for each category.

Answer evaluation metric

The fraction of the categories category in your answer file for which the count cnt matches the count cnt in the reference answer file.


A5 – Question 5

We consider the links between products as described in the section “Dataset description”: two products are considered directly linked if also_viewed.csv contains a row in which they appear as a pair (in any order).

Let us call a “recommendation island” any set of products within which one can get from any card to any other card by following direct links between products (via neighbours). If two products belong to different recommendation islands, then no chain of such transitions leads from one of them to the other.

We are interested in the recommendation islands that contain both at least one product of the category phones and at least one product of the category accessories.

How many such recommendation islands are there in our data?

Output format

One integer – the number of “recommendation islands” that contain both at least one phones product and at least one accessories product.

Answer evaluation metric

Exact match of the entered answer.

Translated by SOTA. The Russian original is the official version and wins wherever the two differ. The statement PDF does not link the data; the official editorial archive (https://yastatic.net/s3/contest/roi/2026/ml/day2/editorial.zip) contains it as items_A.csv and also_viewed_A.csv. 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
items.csv, also_viewed.csv.
You submit
A1, A2, A3, A5: a single number or brand name entered as the answer. A4: file answer4.csv with header category,cnt and one row per category.
Scoring
20 points per question (100 in total). A1–A3 and A5: exact match; A4: share of categories whose cnt matches the reference. Results of subtasks 1, 2, 3 and 5 are hidden during the tour; 10 attempts per subtask, the last one counts.
Format
Regional stage, Tour 2 (data analysis and machine learning), 19 January 2026; grades 9–11; individual; 300-minute tour (Moscow procedure); submissions in Yandex Contest.

Details

Year
2026, Regional venues across Russia (in person)
Round
Regional Stage, Tour 2 (data analysis and machine learning) · A task
Language
Russian; English translation by SOTA
License
Not stated by the source