
Dreamoon Likes Sequences
Dreamoon likes sequences very much. So he created a problem about the sequence that you can’t find in OEIS: You are given two integers $d, […]
Dreamoon likes sequences very much. So he created a problem about the sequence that you can’t find in OEIS: You are given two integers $d, […]
Dreamoon likes coloring cells very much. There is a row of $n$ cells. Initially, all cells are empty (don’t contain any color). Cells are numbered […]
Drazil likes heap very much. So he created a problem with heap: There is a max heap with a height $h$ implemented on the array. […]
Dreamoon likes strings. Today he created a game about strings: String $s_1, s_2, \ldots, s_n$ is beautiful if and only if for each $1 \le i < […]
You have an array $a$ of length $n$. For every positive integer $x$ you are going to perform the following operation during the $x$-th second: […]
You have unweighted tree of $n$ vertices. You have to assign a positive weight to each edge so that the following condition would hold: For every two […]
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 […]