Пермская региональная олимпиада школьников по программированию 2024
12 problems from Пермская региональная олимпиада школьников по программированию 2024 (contest 105454), difficulty -. 2/12 solutions verified against sample I/O.
Пермская региональная олимпиада школьников по программированию 2024
Special | 12 problems | 2/12 verified | Difficulty - | 20m 14s
CF 105454L - Конфет много не бывает
Two players alternate taking turns from a pile of $N$ candies. The first player starts, and on each move a player removes some number of candies, but only amounts that are powers of two, meaning the move set is $1, 2, 4, 8, 16, dots$.
CF 105454J - Диета для учёных
We are given a set of dishes, each with four nutritional values: proteins, fats, carbohydrates, and calories. Separately, we are given acceptable ranges for each of these four quantities.
CF 105454I - Грибы против зомби
We are given a sorted set of objects on a number line: some positions contain zombies moving left, and some contain mushrooms that can reverse a zombie’s direction. A zombie starts in a normal state moving toward decreasing coordinates at speed 1.
CF 105454F - Новое слово
We are given an alphabet that is cyclic, numbered from 1 to $C$. A word is just a sequence of these numbers, and we are interested in finding occurrences of a pattern word $W$ inside multiple texts.
CF 105454D - Музыкальные стулья
The game can be viewed as a directed graph on $n$ vertices, where each vertex $i$ has exactly one outgoing edge to $ai$. Every participant initially sits on a distinct vertex (chair), and during a round they all try to move along the outgoing edge of their current vertex.
CF 105454B - Красивый угол
We are working in a plane with a vertex that defines an angle and two rays forming its sides. One ray is determined by the vertex and a second point, and the other ray is determined similarly.
CF 105454E - Команды на ПРОШП
We are given a group of $n$ people and want to form teams of exactly three distinct members. However, not every triple is allowed because there are $m$ forbidden pairs of people who cannot appear together in the same team.
CF 105454K - Квантовые каналы связи
We are given a binary string consisting only of opening and closing parentheses. From this string, we consider subsequences, meaning we may delete characters without changing the order of the remaining ones.
CF 105454H - Как же это посчитать?
We are given an interval of integers from a to b, and we need to count how many numbers inside this interval have exactly six positive divisors.
CF 105454G - Сестра и братья
We are dealing with a situation where two baskets of apples exist. One basket contains a known amount $X$, the second contains an unknown positive number $Y$, strictly smaller than $X$.
CF 105454A - Очень длинное условие
We are given a rooted tree with vertices numbered from 1 to n, where each vertex except the root has a parent given explicitly. The task is to assign one of k colors to every vertex such that no edge connects two vertices of the same color.
CF 105454C - Почтальон Печкин в большом городе
The city is an undirected connected graph where each house is a vertex and each road is an unweighted edge. A postal hub must be placed at exactly one vertex.