Primal Sport

2020 VietMX 0

Alice and Bob begin their day with a quick game. They first choose a starting number X 0 ≥ 3 and try to reach one million by the process described […]

Resource Distribution

2020 VietMX 0

One department of some software company has $n$ servers of different specifications. Servers are indexed with consecutive integers from $1$ to $n$. Suppose that the […]

Stairs and Elevators

2020 VietMX 1

In the year of $30XX$ participants of some world programming championship live in a single large hotel. The hotel has $n$ floors. Each floor has […]

Aztec Catacombs

2020 VietMX 0

Indiana Jones found ancient Aztec catacombs containing a golden idol. The catacombs consists of $n$ caves. Each pair of caves is connected with a two-way […]

May Holidays

2020 VietMX 0

It’s May in Flatland, and there are $m$ days in this month. Despite the fact that May Holidays are canceled long time ago, employees of […]

Big Secret

2020 VietMX 0

Vitya has learned that the answer for The Ultimate Question of Life, the Universe, and Everything is not the integer 54 42, but an increasing integer sequence […]

Antipalindrome

2020 VietMX 0

A string is a palindrome if it reads the same from the left to the right and from the right to the left. For example, […]

Businessmen Problems

2020 VietMX 0

Two famous competing companies ChemForces and TopChemist decided to show their sets of recently discovered chemical elements on an exhibition. However they know that no element should be present […]

Useful Decomposition

2020 VietMX 0

Ramesses knows a lot about problems involving trees (undirected connected graphs without cycles)! He created a new useful tree decomposition, but he does not know […]

Bookshelves

2020 VietMX 0

Mr Keks is a typical white-collar in Byteland. He has a bookshelf in his office with some books on it, each book has an integer […]

Addition on Segments

2020 VietMX 0

Grisha come to a contest and faced the following problem. You are given an array of size $n$, initially consisting of zeros. The elements of […]

Round Marriage

2020 VietMX 0

It’s marriage season in Ringland! Ringland has a form of a circle’s boundary of length $L$. There are $n$ bridegrooms and $n$ brides, and bridegrooms […]

Magic multisets

2020 VietMX 0

In the School of Magic in Dirtpolis a lot of interesting objects are studied on Computer Science lessons. Consider, for example, the magic multiset. If […]

K Paths

2020 VietMX 0

You are given a tree of $n$ vertices. You are to select $k$ (not necessarily distinct) simple paths in such a way that it is […]

Fair

2020 VietMX 0

Some company is going to hold a fair in Byteland. There are $n$ towns in Byteland and $m$ two-way roads between towns. Of course, you […]

Petr and Permutations

2020 VietMX 0

Petr likes to come up with problems about randomly generated data. This time problem is about random permutation. He decided to generate a random permutation […]

AND Graph

2020 VietMX 0

You are given a set of size $m$ with integer elements between $0$ and $2^{n}-1$ inclusive. Let’s build an undirected graph on these integers in […]

Prince’s Problem

2020 VietMX 0

Let the main characters of this problem be personages from some recent movie. New Avengers seem to make a lot of buzz. I didn’t watch […]

Perfect Encoding

2020 VietMX 0

You are working as an analyst in a company working on a new system for big data storage. This system will store $n$ different objects. […]