Travel Card

2020 VietMX 0

A new innovative ticketing systems for public transport is introduced in Bytesburg. Now there is a single travel card for all transport. To make a […]

Pavel and barbecue

2020 VietMX 0

Pavel cooks barbecue. There are n skewers, they lay on a brazier in a row, each on one of n positions. Pavel wants each skewer to be cooked some […]

Nikita and stack

2020 VietMX 0

Nikita has a stack. A stack in this problem is a data structure that supports two operations. Operation push(x) puts an integer x on the top of the stack, […]

Bacterial Melee

2020 VietMX 0

Julia is conducting an experiment in her lab. She placed several luminescent bacterial colonies in a horizontal testtube. Different types of bacteria can be distinguished […]

A Serial Killer

2020 VietMX 0

Our beloved detective, Sherlock is currently trying to catch a serial killer who kills a person each day. Using his powers of deduction, he came […]

The Holmes Children

2020 VietMX 0

The Holmes children are fighting over who amongst them is the cleverest. Mycroft asked Sherlock and Eurus to find value of f(n), where f(1) = 1 and for n ≥ 2, f(n) is the number […]

Molly’s Chemicals

2020 VietMX 0

Molly Hooper has n different kinds of chemicals arranged in a line. Each of the chemicals has an affection value, The i-th of them has affection value a i. Molly […]

The Door Problem

2020 VietMX 0

Moriarty has trapped n people in n distinct rooms in a hotel. Some rooms are locked, others are unlocked. But, there is a condition that the people in the […]

Carrot Cakes

2020 VietMX 0

In some game by Playrix it takes t minutes for an oven to bake k carrot cakes, all cakes are ready at the same moment t minutes after they started baking. […]

Fountains

2020 VietMX 0

Arkady plays Gardenscapes a lot. Arkady wants to build two new fountains. There are n available fountains, for each fountain its beauty and cost are known. There […]

T-shirt buying

2020 VietMX 0

A new pack of n t-shirts came to a shop. Each of the t-shirts is characterized by three integers p i, a i and b i, where p i is the price of the i-th t-shirt, a i is front color […]

Field expansion

2020 VietMX 1

In one of the games Arkady is fond of the game process happens on a rectangular field. In the game process Arkady can buy extensions […]

Cut the pie

2020 VietMX 0

Arkady reached the n-th level in Township game, so Masha decided to bake a pie for him! Of course, the pie has a shape of convex n-gon, […]

Aquarium decoration

2020 VietMX 0

Arkady and Masha want to choose decorations for thier aquarium in Fishdom game. They have n decorations to choose from, each of them has some cost. To […]

Sorting by Subsequences

2020 VietMX 0

You are given a sequence a 1, a 2, …, a n consisting of different integers. It is required to split this sequence into the maximum number of subsequences such that after sorting integers in each of […]