
Perfect Triples
Consider the infinite sequence $s$ of positive integers, created by repeating the following steps: Find the lexicographically smallest triple of positive integers $(a, b, c)$ […]
Consider the infinite sequence $s$ of positive integers, created by repeating the following steps: Find the lexicographically smallest triple of positive integers $(a, b, c)$ […]
You have a tree of $n$ vertices. You are going to convert this tree into $n$ rubber bands on infinitely large plane. Conversion rule follows: […]
You are given three positive integers $n$, $a$ and $b$. You have to construct a string $s$ of length $n$ consisting of lowercase Latin letters […]
There are two sisters Alice and Betty. You have $n$ candies. You want to distribute these $n$ candies between two sisters in such a way […]
You have $n$ students under your control and you have to compose exactly two teams consisting of some subset of your students. Each student had his own […]
You are given a correct solution of the sudoku puzzle. If you don’t know what is the sudoku, you can read about it here. The picture […]
The only difference between easy and hard versions is constraints. You are given a sequence $a$ consisting of $n$ positive integers. Let’s define a three blocks […]
There is a rectangular grid of size $n \times m$. Each cell of the grid is colored black (‘0’) or white (‘1’). The color of […]
Writing light novels is the most important thing in Linova’s life. Last night, Linova dreamed about a fantastic kingdom. She began to write a light […]
Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse […]
Kaavi, the mysterious fortune teller, deeply believes that one’s fate is inevitable and unavoidable. Of course, she makes her living by predicting others’ future. While […]
This is an interactive problem. Yui is a girl who enjoys playing Mahjong. She has a mysterious set which consists of tiles (this set can […]
Denis, after buying flowers and sweets (you will learn about this story in the next task), went to a date with Nastya to ask her […]
Denis was very sad after Nastya rejected him. So he decided to walk through the gateways to have some fun. And luck smiled at him! […]
Denis came to Nastya and discovered that she was not happy to see him… There is only one chance that she can become happy. Denis […]
If the girl doesn’t go to Denis, then Denis will go to the girl. Using this rule, the young man left home, bought flowers and […]
Hilbert’s Hotel is a very unusual hotel since the number of rooms is infinite! In fact, there is exactly one room for every integer, including zero […]
A monopole magnet is a magnet that only has one pole, either north or south. They don’t actually exist since real magnets have two poles, […]
Logical quantifiers are very useful tools for expressing claims about a set. For this problem, let’s focus on the set of real numbers specifically. The set […]