
Competitive Programmer
Bob is a competitive programmer. He wants to become red, and for that he needs a strict training regime. He went to the annual meeting […]
Bob is a competitive programmer. He wants to become red, and for that he needs a strict training regime. He went to the annual meeting […]
Bob is playing with $6$-sided dice. A net of such standard cube is shown below. He has an unlimited supply of these dice and wants […]
Let $a$ be a matrix of size $r \times c$ containing positive integers, not necessarily distinct. Rows of the matrix are numbered from $1$ to […]
There are $n$ people in this world, conveniently numbered $1$ through $n$. They are using burles to buy goods and services. Occasionally, a person might […]
Bob is playing a game of Spaceship Solitaire. The goal of this game is to build a spaceship. In order to do this, he first […]
Let $G$ be a simple graph. Let $W$ be a non-empty subset of vertices. Then $W$ is almost-$k$-uniform if for each pair of distinct vertices $u,v \in […]
You are given an integer $x$ of $n$ digits $a_1, a_2, \ldots, a_n$, which make up its decimal notation in order from left to right. […]
You are given a Young diagram. Given diagram is a histogram with $n$ columns of lengths $a_1, a_2, \ldots, a_n$ ($a_1 \geq a_2 \geq \ldots […]
You are given a permutation $p_1, p_2, \ldots, p_n$. In one move you can swap two adjacent values. You want to perform a minimum number […]
You are given a tournament — complete directed graph. In one operation you can pick any vertex $v$ and change the direction of all edges with […]
You are given a cactus graph, in this graph each edge lies on at most one simple cycle. It is given as $m$ edges $a_i, […]
For an array $a$ of integers let’s denote its maximal element as $\max(a)$, and minimal as $\min(a)$. We will call an array $a$ of $k$ […]
You are given a set of $n\ge 2$ pairwise different points with integer coordinates. Your task is to partition these points into two nonempty groups $A$ and $B$, such […]
Let’s call a binary string $s$ awesome, if it has at least $1$ symbol 1 and length of the string is divisible by the number of 1 in it. In […]
This problem is interactive. We have hidden an array $a$ of $n$ pairwise different numbers (this means that no two numbers are equal). You can get some […]
A sequence $a = [a_1, a_2, \ldots, a_l]$ of length $l$ has an ascent if there exists a pair of indices $(i, j)$ such that $1 \le […]
Recall that the permutation is an array consisting of $n$ distinct integers from $1$ to $n$ in arbitrary order. For example, $[2,3,1,5,4]$ is a permutation, […]
Happy new year! The year 2020 is also known as Year Gyeongja (경자년, gyeongja-nyeon) in Korea. Where did the name come from? Let’s briefly look at the Gapja system, which […]