Landmarks

2020 VietMX 0

We have an old building with n + 2 columns in a row. These columns support the ceiling. These columns are located in points with coordinates 0 = x 0 < x 1 < … < x n < x n + 1. The leftmost and […]

Berland Miners

2020 VietMX 0

The biggest gold mine in Berland consists of n caves, connected by n - 1 transitions. The entrance to the mine leads to the cave number 1, it is possible to go […]

Quest

2020 VietMX 0

Polycarp is making a quest for his friends. He has already made n tasks, for each task the boy evaluated how interesting it is as an integer q i, […]

Playing on Graph

2020 VietMX 0

Vova and Marina love offering puzzles to each other. Today Marina offered Vova to cope with the following task. Vova has a non-directed graph consisting […]

Place Your Ad Here

2020 VietMX 0

Ivan Anatolyevich’s agency is starting to become famous in the town. They have already ordered and made n TV commercial videos. Each video is made in a […]

Superhero’s Job

2020 VietMX 0

It’s tough to be a superhero. And it’s twice as tough to resist the supervillain who is cool at math. Suppose that you’re an ordinary […]

Idempotent functions

2020 VietMX 0

Some time ago Leonid have known about idempotent functions. Idempotent function defined on a set {1, 2, …, n} is such function , that for any  the formula g(g(x)) = g(x) holds. Let’s denote as f (k)(x) the function f applied k times to the value x. […]

Face Detection

2020 VietMX 0

The developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for […]

Degenerate Matrix

2020 VietMX 0

The determinant of a matrix 2 × 2 is defined as follows: A matrix is called degenerate if its determinant is equal to zero. The norm ||A|| of a matrix A is defined as a maximum of absolute […]

Happy Line

2020 VietMX 0

Do you like summer? Residents of Berland do. They especially love eating ice cream in the hot summer. So this summer day a large queue […]

The Game Of Parity

2020 VietMX 0

There are n cities in Westeros. The i-th city is inhabited by a i people. Daenerys and Stannis play the following game: in one single move, a player chooses a certain […]

Haar Features

2020 VietMX 0

The first algorithm for detecting a face on the image working in realtime was developed by Paul Viola and Michael Jones in 2001. A part […]

Looksery Party

2020 VietMX 0

The Looksery company, consisting of n staff members, is planning another big party. Every employee has his phone number and the phone numbers of his friends in […]

Yura and Developers

2020 VietMX 0

Yura has a team of k developers and a list of n tasks numbered from 1 to n. Yura is going to choose some tasks to be done this week. Due to […]

Pudding Monsters

2020 VietMX 0

In this problem you will meet the simplified model of game Pudding Monsters. An important process in developing any game is creating levels. A game […]

Restructuring Company

2020 VietMX 0

Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge […]

Max and Min

2020 VietMX 0

Two kittens, Max and Min, play with a pair of non-negative integers x and y. As you can guess from their names, kitten Max loves to maximize and […]

Replicating Processes

2020 VietMX 0

A Large Software Company develops its own social network. Analysts have found that during the holidays, major sporting events and other significant events users begin […]

Restoring Map

2020 VietMX 0

Archaeologists found some information about an ancient land of Treeland. We know for sure that the Treeland consisted of n cities connected by the n - 1 road, such that you […]