
The Tower is Going Home
On a chessboard with a width of $10^9$ and a height of $10^9$, the rows are numbered from bottom to top from $1$ to $10^9$, […]
On a chessboard with a width of $10^9$ and a height of $10^9$, the rows are numbered from bottom to top from $1$ to $10^9$, […]
You are given $n$ points on the plane. The polygon formed from all the $n$ points is strictly convex, that is, the polygon is convex, and […]
There is an array $a$ of $2^{30}$ integers, indexed from $0$ to $2^{30}-1$. Initially, you know that $0 \leq a_i < 2^{30}$ ($0 \leq i […]
You are playing a strange game with Li Chen. You have a tree with $n$ nodes drawn on a piece of paper. All nodes are […]
Alice’s hair is growing by leaps and bounds. Maybe the cause of it is the excess of vitamins, or maybe it is some black magic… […]
Bob and Alice are often participating in various programming competitions. Like many competitive programmers, Alice and Bob have good and bad days. They noticed, that […]
You are a given a list of integers $a_1, a_2, \ldots, a_n$ and $s$ of its segments $[l_j; r_j]$ (where $1 \le l_j \le r_j […]
You are given a connected undirected graph without cycles (that is, a tree) of $n$ vertices, moreover, there is a non-negative integer written on every […]
Alice has written a program and now tries to improve its readability. One of the ways to improve readability is to give sensible names to […]
Chouti was doing a competitive programming competition. However, after having all the problems accepted, he got bored and decided to invent some small games. He […]
On his free time, Chouti likes doing some housework. He has got one new task, paint some bricks in the yard. There are $n$ bricks […]
Chouti was tired of the tedious homework, so he opened up an old programming problem he created years ago. You are given a connected undirected […]
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 […]