
Au Pont Rouge
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 […]
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 […]
You are given a permutation $p_1, p_2, \dots, p_n$. A permutation of length $n$ is a sequence such that each integer between $1$ and $n$ […]
The biggest event of the year – Cota 2 world championship “The Innernational” is right around the corner. $2^n$ teams will compete in a double-elimination […]
Polycarp is working on the implementation of displaying likes on the Codehorses social network. The number of likes should be displayed in a format that […]
Polycarp is the project manager in the IT-company. Right now, he needs to choose developers for his team to start a new project. The company […]
For the first time, Polycarp’s startup ended the year with a profit! Now he is about to distribute $k$ burles as a bonus among $n$ […]
Treeland consists of $n$ cities and $n-1$ two-way roads connecting pairs of cities. From every city, you can reach every other city moving only by […]
You are given a string $s$ of lowercase Latin letters. It is required to paint each letter of the string in one of two colors […]
Recently, Polycarp has invented a new mobile game with falling blocks. In the game, $n$ blocks are falling down, one at a time, towards a […]
Kuroni has $n$ daughters. As gifts for them, he bought $n$ necklaces and $n$ bracelets: the $i$-th necklace has a brightness $a_i$, where all the […]