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

Domino for Young

2020 VietMX 0

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

K Integers

2020 VietMX 0

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

Happy Cactus

2020 VietMX 0

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

Card Game

2020 VietMX 0

Two players decided to play one interesting card game. There is a deck of $n$ cards, with values from $1$ to $n$. The values of […]

Interesting Subarray

2020 VietMX 0

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

Divide Points

2020 VietMX 0

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

Make Good

2020 VietMX 0

Let’s call an array $a_1, a_2, \dots, a_m$ of nonnegative integer numbers good if $a_1 + a_2 + \dots + a_m = 2\cdot(a_1 \oplus a_2 \oplus \dots […]

Awesome Substrings

2020 VietMX 0

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

Strange Device

2020 VietMX 0

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

New Year and Permutation

2020 VietMX 0

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

New Year and Naming

2020 VietMX 0

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