Messy

2020 VietMX 0

You are fed up with your messy room, so you decided to clean it up. Your room is a bracket sequence $s=s_{1}s_{2}\dots s_{n}$ of length […]

Not Same

2020 VietMX 0

You are given an integer array $a_1, a_2, \dots, a_n$, where $a_i$ represents the number of blocks at the $i$-th position. It is guaranteed that […]

Arson In Berland Forest

2020 VietMX 0

The Berland Forest can be represented as an infinite cell plane. Every cell contains a tree. That is, contained before the recent events. A destructive […]

Xor-Set

2020 VietMX 0

You are given two sets of integers: $A$ and $B$. You need to output the sum of elements in the set $C = \{x | […]

Beautiful Sequence

2020 VietMX 0

An integer sequence is called beautiful if the difference between any two consecutive numbers is equal to $1$. More formally, a sequence $s_1, s_2, \ldots, s_{n}$ is […]

Beautiful League

2020 VietMX 0

A football league has recently begun in Beautiful land. There are $n$ teams participating in the league. Let’s enumerate them with integers from $1$ to […]

Dice Tower

2020 VietMX 0

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

Diverse Matrix

2020 VietMX 0

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

Decreasing Debts

2020 VietMX 0

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

Almost Same Distance

2020 VietMX 0

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