
Exercising Walk
Alice has a cute cat. To keep her cat fit, Alice wants to design an exercising walk for her cat! Initially, Alice’s cat is located […]
Alice has a cute cat. To keep her cat fit, Alice wants to design an exercising walk for her cat! Initially, Alice’s cat is located […]
A positive integer is called composite if it can be represented as a product of two positive integers, both greater than $1$. For example, the following numbers […]
Word $s$ of length $n$ is called $k$-complete if $s$ is a palindrome, i.e. $s_i=s_{n+1-i}$ for all $1 \le i \le n$; $s$ has a […]
Bob is playing a game named “Walk on Matrix”. In this game, player is given an $n \times m$ matrix $A=(a_{i,j})$, i.e. the element in […]
Eric is the teacher of graph theory class. Today, Eric teaches independent set and edge-induced subgraph. Given a graph $G=(V,E)$, an independent set is a subset of […]
Alice has got addicted to a game called Sirtet recently. In Sirtet, player is given an $n \times m$ grid. Initially $a_{i,j}$ cubes are stacked […]
Young boy Artem tries to paint a picture, and he asks his mother Medina to help him. Medina is very busy, that’s why she asked […]
Once again, Boris needs the help of Anton in creating a task. This time Anton needs to solve the following problem: There are two arrays […]
Eugene likes working with arrays. And today he needs your help in solving one challenging task. An array $c$ is a subarray of an array […]
Kate has a set $S$ of $n$ integers $\{1, \dots, n\} $. She thinks that imperfection of a subset $M \subseteq S$ is equal to the maximum of $gcd(a, […]
There are $n$ children, who study at the school №41. It is well-known that they are good mathematicians. Once at a break, they arranged a […]
Egor wants to achieve a rating of 1600 points on the well-known chess portal ChessForces and he needs your help! Before you start solving the […]
Polycarp has recently created a new level in this cool new game Berlio Maker 85 and uploaded it online. Now players from all over the […]
Many years ago Berland was a small country where only $n$ people lived. Each person had some savings: the $i$-th one had $a_i$ burles. The […]
You are playing another computer game, and now you have to slay $n$ monsters. These monsters are standing in a circle, numbered clockwise from $1$ […]
You are given a complete directed graph $K_n$ with $n$ vertices: each pair of vertices $u \neq v$ in $K_n$ have both directed edges $(u, v)$ and […]
You are given a positive integer $D$. Let’s build the following graph from it: each vertex is a divisor of $D$ (not necessarily prime, $1$ […]
Let’s denote the following function $f$. This function takes an array $a$ of length $n$ and returns an array. Initially the result is an empty […]
You are given a permutation $p$ consisting of exactly $26$ integers from $1$ to $26$ (since it is a permutation, each integer from $1$ to […]
Slime and his $n$ friends are at a party. Slime has designed a game for his friends to play. At the beginning of the game, […]