Flawed Flow

2020 VietMX 0

Emuskald considers himself a master of flow algorithms. Now he has completed his most ingenious program yet — it calculates the maximum flow in an […]

Magical Boxes

2020 VietMX 0

Emuskald is a well-known illusionist. One of his trademark tricks involves a set of magical boxes. The essence of the trick is in packing the […]

Greenhouse Effect

2020 VietMX 1

Emuskald is an avid horticulturist and owns the world’s longest greenhouse — it is effectively infinite in length. Over the years Emuskald has cultivated n plants in […]

Maximum Waterfall

2020 VietMX 0

Emuskald was hired to design an artificial waterfall according to the latest trends in landscape architecture. A modern artificial waterfall consists of multiple horizontal panels […]

Dima and Staircase

2020 VietMX 0

Dima’s got a staircase that consists of n stairs. The first stair is at height a 1, the second one is at a 2, the last one is at a n (1 ≤ a 1 ≤ a 2 ≤ … ≤ a n). Dima decided […]

Dima and Two Sequences

2020 VietMX 0

Little Dima has two sequences of points with integer coordinates: sequence (a 1, 1), (a 2, 2), …, (a n, n) and sequence (b 1, 1), (b 2, 2), …, (b n, n). Now Dima wants to count the number of distinct sequences of points of […]

Dima and Figure

2020 VietMX 0

Dima loves making pictures on a piece of squared paper. And yet more than that Dima loves the pictures that depict one of his favorite […]

Dima and Game

2020 VietMX 0

Dima and Anya love playing different games. Now Dima has imagined a new game that he wants to play with Anya. Dima writes n pairs of integers […]

Dima and Horses

2020 VietMX 0

Dima came to the horse land. There are n horses living in the land. Each horse in the horse land has several enemies (enmity is a symmetric […]

Rectangle Puzzle

2020 VietMX 0

You are given two rectangles on a plane. The centers of both rectangles are located in the origin of coordinates (meaning the center of the […]

Maximum Xor Secondary

2020 VietMX 0

Bike loves looking for the second maximum element in the sequence. The second maximum element in the sequence of distinct numbers x 1, x 2, …, x k (k > 1) is such maximum element x j, that […]

Game on Tree

2020 VietMX 0

Momiji has got a rooted tree, consisting of n nodes. The tree nodes are numbered by integers from 1 to n. The root has number 1. Momiji decided to play a […]

Spyke Talks

2020 VietMX 0

Polycarpus is the director of a large corporation. There are n secretaries working for the corporation, each of them corresponds via the famous Spyke VoIP system during […]

Command Line Arguments

2020 VietMX 0

The problem describes the properties of a command line. The description somehow resembles the one you usually see in real operating systems. However, there are […]

Network Mask

2020 VietMX 0

The problem uses a simplified TCP/IP address model, please make sure you’ve read the statement attentively. Polycarpus has found a job, he is a system […]

Parallel Programming

2020 VietMX 0

Polycarpus has a computer with n processors. Also, his computer has n memory cells. We’ll consider the processors numbered by integers from 1 to n and that the memory cells are […]

Tree-String Problem

2020 VietMX 0

A rooted tree is a non-directed connected graph without any cycles with a distinguished vertex, which is called the tree root. Consider the vertices of a rooted […]

Network Topology

2020 VietMX 0

This problem uses a simplified network topology model, please read the problem statement carefully and use it as a formal document as you develop the […]

SMSC

2020 VietMX 0

Some large corporation where Polycarpus works has its own short message service center (SMSC). The center’s task is to send all sorts of crucial information. […]

Copying Data

2020 VietMX 0

We often have to copy large volumes of information. Such operation can take up many computer resources. Therefore, in this problem you are advised to […]