
Xenon’s Attack on the Gangs
On another floor of the A.R.C. Markland-N, the young man Simon “Xenon” Jackson, takes a break after finishing his project early (as always). Having a […]
On another floor of the A.R.C. Markland-N, the young man Simon “Xenon” Jackson, takes a break after finishing his project early (as always). Having a […]
This is an interactive problem! On a normal day at the hidden office in A.R.C. Markland-N, Rin received an artifact, given to her by the […]
Let’s call two strings $s$ and $t$ anagrams of each other if it is possible to rearrange symbols in the string $s$ to get a string, equal […]
You and your $n – 1$ friends have found an array of integers $a_1, a_2, \dots, a_n$. You have decided to share it in the […]
You are given $n$ pairwise non-collinear two-dimensional vectors. You can make shapes in the two-dimensional plane with these vectors in the following fashion: Start at […]
This is the hard version of the problem. You can find the easy version in the Div. 2 contest. Both versions only differ in the […]
There are $n$ lamps on a line, numbered from $1$ to $n$. Each one has an initial state off ($0$) or on ($1$). You’re given […]
The USA Construction Operation (USACO) recently ordered Farmer John to arrange a row of $n$ haybale piles on the farm. The $i$-th pile contains $a_i$ haybales. However, […]
Bessie has way too many friends because she is everyone’s favorite cow! Her new friend Rabbit is trying to hop over so they can play! […]
Bessie is out grazing on the farm, which consists of $n$ fields connected by $m$ bidirectional roads. She is currently at field $1$, and will […]
After a successful year of milk production, Farmer John is rewarding his cows with their favorite treat: tasty grass! On the field, there is a […]
VK news recommendation system daily selects interesting publications of one of $n$ disjoint categories for each user. Each publication belongs to exactly one category. For […]
Let’s define the function $f$ of multiset $a$ as the multiset of number of occurences of every number, that is present in $a$. E.g., $f(\{5, […]
VK just opened its second HQ in St. Petersburg! Side of its office building has a huge string $s$ written on its side. This part […]
In modern cryptography much is tied to the algorithmic complexity of solving several problems. One of such problems is a discrete logarithm problem. It is […]
Polycarp has guessed three positive integers $a$, $b$ and $c$. He keeps these numbers in secret, but he writes down four numbers on a board […]
Petya has an array $a$ consisting of $n$ integers. He wants to remove duplicate (equal) elements. Petya wants to leave only the rightmost entry (occurrence) […]
The busses in Berland are equipped with a video surveillance system. The system records information about changes in the number of passengers in a bus […]