Checklist VsOSh AI 2026 Regional Stage, Tour 1 (mathematics) · H task
Lonely Circle
Russian title: Одинокий круг
Given points labelled ±1 that are separable by a circle, output any separating circle.
The task
The statement introduces linear SVM classification with a scikit-learn code example, then poses an interview problem: points on the plane carry labels −1 and +1, and it is guaranteed that there is a circle with centre (x₀, y₀) and radius R > 0 such that all −1 points lie strictly inside it and all +1 points strictly outside.
Find any such circle.
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.
- Task statement Russian original of Task statement
- Full paper (all tasks of the tour) Russian original of Full paper (all tasks of the tour)
- Official editorial (all tasks of the tour) Russian original of Official editorial (all tasks of the tour)
Read the task statement in English
Lonely Circle
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 1, 17 January 2026
Task H
Points for the task: 50
Answer submission format: program code
Number of attempts: 100
Submission that counts: the last one
Time limit: 10 seconds
Memory limit: 64 MB
Input: standard input or input.txt
Output: standard output or output.txt
Statement
Andrey is preparing for an interview for a machine learning internship. To understand the basic ideas of classification, he started with the simplest case: if the points of two classes on the plane can be separated by a line, then the support vector machine (SVM) builds a separating line
and the sign of the expression determines which class a point belongs to (on one side of the line all points will have the sign , and on the other side, ).
This is how Andrey became acquainted with linear classification.
He found a simple code example that shows how to read points from standard input, write them into a table with the columns x, y, label, and train a linear SVM on this data:
import sys
import pandas as pd
from sklearn.svm import SVC
def read_points():
data = []
tokens = sys.stdin.read().split()
it = iter(tokens)
n = int(next(it))
for _ in range(n):
x = float(next(it))
y = float(next(it))
label = int(next(it))
data.append((x, y, label))
df = pd.DataFrame(data, columns=["x", "y", "label"])
return df
df = read_points()
clf = SVC(kernel="linear")
clf.fit(df[["x", "y"]], df["label"])
w1, w2 = clf.coef_[0]
b = clf.intercept_[0]
print(w1, w2, b)
At the interview, however, Andrey was given a different task.
Points on the plane with class labels and are given. It is guaranteed that there exists a circle with centre and radius such that
- all points of class lie strictly inside this circle;
- all points of class lie strictly outside this circle.
You need to find any such circle .
Help Andrey solve this problem and pass the interview!
Input format
The first line contains an integer (). Then lines follow, each with three real numbers , , : the coordinates of the next point and its label.
It is guaranteed that .
Output format
Output three real numbers , and : the coordinates and the radius of the separating circle.
Scoring
Each test passed gives you 1 point.
The maximum possible score for the task is 50.
Test results are available during the tour.
Example
Input
10
0 0 -1
1 1 -1
2 0 -1
-2 0 -1
0 2 -1
4 0 1
-4 0 1
0 4 1
3 4 1
4 3 1
Output
0 0 3
Notes
This picture corresponds to the first example.
Orange points correspond to , blue points correspond to .
[Figure: the points of the example (label as orange crosses, label as blue dots) and the circle with centre and radius on a grid from to ; see page 12 of the original statement.]
Translated by SOTA. The Russian original is the official version and wins wherever the two differ. The figure for the example is not reproduced; see page 12 of the original PDF. 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
- Standard input (or
input.txt): n (3 ≤ n ≤ 10⁵), then n linesx_i,y_i,label_iwith |x_i|, |y_i| ≤ 10⁹. - You submit
- Three real numbers x, y and R describing a separating circle.
- Scoring
- 1 point per passed test, up to 50 points; test results visible during the tour; 100 attempts, the last one counts.
- Rules
- Program submission; time limit 10 s; memory limit 64 MB; output to standard output or
output.txt.
- Program submission; time limit 10 s; memory limit 64 MB; output to standard output or
- Format
- Regional stage, Tour 1, 17 January 2026; grades 9–11; individual; 300-minute tour (Moscow procedure); answers entered in Yandex Contest.