Perfect Triples

2020 VietMX 0

Consider the infinite sequence $s$ of positive integers, created by repeating the following steps: Find the lexicographically smallest triple of positive integers $(a, b, c)$ […]

Nested Rubber Bands

2020 VietMX 0

You have a tree of $n$ vertices. You are going to convert this tree into $n$ rubber bands on infinitely large plane. Conversion rule follows: […]

JYPnation

2020 VietMX 0

Due to the success of TWICE, JYP Entertainment has earned countless money and emerged as the biggest entertainment firm by market capitalization. Therefore, the boss, […]

Construct the String

2020 VietMX 0

You are given three positive integers $n$, $a$ and $b$. You have to construct a string $s$ of length $n$ consisting of lowercase Latin letters […]

Two Teams Composing

2020 VietMX 0

You have $n$ students under your control and you have to compose exactly two teams consisting of some subset of your students. Each student had his own […]

Anti-Sudoku

2020 VietMX 0

You are given a correct solution of the sudoku puzzle. If you don’t know what is the sudoku, you can read about it here. The picture […]

Three Blocks Palindrome

2020 VietMX 0

The only difference between easy and hard versions is constraints. You are given a sequence $a$ consisting of $n$ positive integers. Let’s define a three blocks […]

Robots on a Grid

2020 VietMX 0

There is a rectangular grid of size $n \times m$. Each cell of the grid is colored black (‘0’) or white (‘1’). The color of […]

Linova and Kingdom

2020 VietMX 0

Writing light novels is the most important thing in Linova’s life. Last night, Linova dreamed about a fantastic kingdom. She began to write a light […]

Kaavi and Magic Spell

2020 VietMX 0

Kaavi, the mysterious fortune teller, deeply believes that one’s fate is inevitable and unavoidable. Of course, she makes her living by predicting others’ future. While […]

Yui and Mahjong Set

2020 VietMX 0

This is an interactive problem. Yui is a girl who enjoys playing Mahjong. She has a mysterious set which consists of tiles (this set can […]

Hilbert’s Hotel

2020 VietMX 0

Hilbert’s Hotel is a very unusual hotel since the number of rooms is infinite! In fact, there is exactly one room for every integer, including zero […]

Monopole Magnets

2020 VietMX 0

A monopole magnet is a magnet that only has one pole, either north or south. They don’t actually exist since real magnets have two poles, […]

Quantifier Question

2020 VietMX 0

Logical quantifiers are very useful tools for expressing claims about a set. For this problem, let’s focus on the set of real numbers specifically. The set […]