Security

2020 VietMX 0

Some programming website is establishing a secure communication protocol. For security reasons, they want to choose several more or less random strings. Initially, they have […]

A Game on Strings

2020 VietMX 0

Alice and Bob are playing a game on strings. Initially, they have some string $t$. In one move the first player selects the character $c$ […]

King Escape

2020 VietMX 0

Alice and Bob are playing chess on a huge chessboard with dimensions $n \times n$. Alice has a single piece left — a queen, located at […]

Square Difference

2020 VietMX 0

Alice has a lovely piece of cloth. It has the shape of a square with a side of length $a$ centimeters. Bob also wants such piece of […]

Permutation Game

2020 VietMX 0

After a long day, Alice and Bob decided to play a little game. The game board consists of $n$ cells in a straight line, numbered […]

Divisors

2020 VietMX 0

You are given $n$ integers $a_1, a_2, \ldots, a_n$. Each of $a_i$ has between $3$ and $5$ divisors. Consider $a = \prod a_i$ — the product […]

Boolean Computer

2020 VietMX 0

Alice has a computer that operates on $w$-bit integers. The computer has $n$ registers for values. The current content of the registers is given as an array […]

Chip Game

2020 VietMX 0

Alice and Bob decided to play one ultimate game. They have $n$ piles, the $i$-th pile initially contain $v_i$ chips. Alice selects a positive integer […]

Hidden Bipartite Graph

2020 VietMX 0

Bob has a simple undirected connected graph (without self-loops and multiple edges). He wants to learn whether his graph is bipartite (that is, you can […]

Envy

2020 VietMX 0

For a connected undirected weighted graph G, MST (minimum spanning tree) is a subgraph of G that contains all of G‘s vertices, is a tree, and sum of its […]

Radio stations

2020 VietMX 0

In the lattice points of the coordinate line there are n radio stations, the i-th of which is described by three integers: x i — the coordinate of the i-th station […]

Dog Show

2020 VietMX 1

A new dog show on TV is starting next week. On the show dogs are required to demonstrate bottomless stomach, strategic thinking and self-preservation instinct. […]

Letters Removing

2020 VietMX 0

Petya has a string of length n consisting of small and large English letters and digits. He performs m operations. Each operation is described with two integers l and r and a character c: […]

Elections

2020 VietMX 0

Awruk is taking part in elections in his school. It is the final round. He has only one opponent — Elodreip. The are $n$ students in […]

Lost Array

2020 VietMX 0

Bajtek, known for his unusual gifts, recently got an integer array $x_0, x_1, \ldots, x_{k-1}$. Unfortunately, after a huge array-party with his extraordinary friends, he […]

Smallest Word

2020 VietMX 0

IA has so many colorful magnets on her fridge! Exactly one letter is written on each magnet, ‘a’ or ‘b’. She loves to play with […]

Train Hard, Win Easy

2020 VietMX 0

Zibi is a competitive programming coach. There are $n$ competitors who want to be prepared well. The training contests are quite unusual – there are two […]

Make It One

2020 VietMX 0

Janusz is a businessman. He owns a company “Januszex”, which produces games for teenagers. Last hit of Januszex was a cool one-person game “Make it […]

Speckled Band

2020 VietMX 0

Ildar took a band (a thin strip of cloth) and colored it. Formally, the band has $n$ cells, each of them is colored into one […]