Deduction Queries

2020 VietMX 0

There is an array $a$ of $2^{30}$ integers, indexed from $0$ to $2^{30}-1$. Initially, you know that $0 \leq a_i < 2^{30}$ ($0 \leq i […]

Grid Sort

2020 VietMX 0

You are given an $n \times m$ grid. Each grid cell is filled with a unique integer from $1$ to $nm$ so that each integer […]

Metro

2020 VietMX 90

Alice has a birthday today, so she invited home her best friend Bob. Now Bob needs to find a way to commute to the Alice’s […]

Lucky Days

2020 VietMX 0

Bob and Alice are often participating in various programming competitions. Like many competitive programmers, Alice and Bob have good and bad days. They noticed, that […]

Tree and XOR

2020 VietMX 0

You are given a connected undirected graph without cycles (that is, a tree) of $n$ vertices, moreover, there is a non-negative integer written on every […]

Refactoring

2020 VietMX 0

Alice has written a program and now tries to improve its readability. One of the ways to improve readability is to give sensible names to […]

Definite Game

2020 VietMX 0

Chouti was doing a competitive programming competition. However, after having all the problems accepted, he got bored and decided to invent some small games. He […]

Colorful Bricks

2020 VietMX 4

On his free time, Chouti likes doing some housework. He has got one new task, paint some bricks in the yard. There are $n$ bricks […]

Maximum Distance

2020 VietMX 0

Chouti was tired of the tedious homework, so he opened up an old programming problem he created years ago. You are given a connected undirected […]

Farewell Party

2020 VietMX 0

Chouti and his classmates are going to the university soon. To say goodbye to each other, the class has planned a big farewell party in […]

Missing Numbers

2020 VietMX 0

Chouti is working on a strange math problem. There was a sequence of $n$ positive integers $x_1, x_2, \ldots, x_n$, where $n$ is even. The […]

Tricky Interactor

2020 VietMX 0

This is an interactive problem. Chouti was tired of studying, so he opened the computer and started playing a puzzle game. Long long ago, the […]

Mergesort Strikes Back

2020 VietMX 0

Chouti thought about his very first days in competitive programming. When he had just learned to write merge sort, he thought that the merge sort […]