Exercising Walk

2020 VietMX 2

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 […]

Composite Coloring

2020 VietMX 0

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 […]

K-Complete Word

2020 VietMX 0

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 […]

Walk on Matrix

2020 VietMX 0

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 […]

Independent Set

2020 VietMX 0

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 […]

Height All the Same

2020 VietMX 0

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 […]

Little Artem

2020 VietMX 0

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 […]

Kind Anton

2020 VietMX 1

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 and an array

2020 VietMX 0

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 and imperfection

2020 VietMX 0

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, […]

Road to 1600

2020 VietMX 0

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 […]

Level Statistics

2020 VietMX 0

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 […]

Middle Class

2020 VietMX 93

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 […]

Circle of Monsters

2020 VietMX 0

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$ […]

Minimum Euler Cycle

2020 VietMX 0

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 […]

Divisor Paths

2020 VietMX 1

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$ […]

Strange Function

2020 VietMX 0

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 […]

Substring Search

2020 VietMX 0

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 […]