
Farewell Party
Chouti and his classmates are going to the university soon. To say goodbye to each other, the class has planned a big farewell party in […]
Chouti and his classmates are going to the university soon. To say goodbye to each other, the class has planned a big farewell party in […]
Chouti is working on a strange math problem. There was a sequence of $n$ positive integers $x_1, x_2, \ldots, x_n$, where $n$ is even. The […]
This is an interactive problem. Chouti was tired of studying, so he opened the computer and started playing a puzzle game. Long long ago, the […]
Chouti thought about his very first days in competitive programming. When he had just learned to write merge sort, he thought that the merge sort […]
Alice and Bob are decorating a Christmas Tree. Alice wants only $3$ types of ornaments to be used on the Christmas Tree: yellow, blue and […]
Bob is a pirate looking for the greatest treasure the world has ever seen. The treasure is located at the point $T$, which coordinates to […]
There are $n$ people sitting in a circle, numbered from $1$ to $n$ in the order in which they are seated. That is, for all […]
Let $n$ be an integer. Consider all permutations on integers $1$ to $n$ in lexicographic order, and concatenate them into one big sequence $p$. For […]
Bob is an active user of the social network Faithbug. On this network, people are able to engage in a mutual friendship. That is, if […]
Bob is a duck. He wants to get to Alice’s nest, so that those two can duck! Duck is the ultimate animal! (Image courtesy of […]
Integer factorisation is hard. The RSA Factoring Challenge offered $$100\,000$ for factoring RSA-$1024$, a $1024$-bit long product of two prime numbers. To this date, nobody […]
Alice and Bob play a game on a grid with $n$ rows and infinitely many columns. In each row, there are three tokens, blue, white […]
Consider the following grammar: <expression> ::= <term> | <expression> ‘+’ <term> <term> ::= <number> | <number> ‘-‘ <number> | <number> ‘(‘ <expression> ‘)’ <number> ::= […]
Gennady owns a small hotel in the countryside where he lives a peaceful life. He loves to take long walks, watch sunsets and play cards […]
Petr has just bought a new car. He’s just arrived at the most known Petersburg’s petrol station to refuel it when he suddenly discovered that […]
One day, Yuhao came across a problem about checking if some bracket sequences are correct bracket sequences. A bracket sequence is any non-empty sequence of […]
Makoto has a big blackboard with a positive integer $n$ written on it. He will perform the following action exactly $k$ times: Suppose the number […]
Alex decided to try his luck in TV shows. He once went to the quiz named “What’s That Word?!“. After perfectly answering the questions “How […]
One Saturday afternoon Egor was playing his favorite RPG game. While discovering new lands and territories, he came across the following sign: Egor is a […]
A great legend used to be here, but some troll hacked Codeforces and erased it. Too bad for us, but in the troll society he […]