Fox and Card Game

2020 VietMX 0

Fox Ciel is playing a card game with her friend Fox Jiro. There are n piles of cards on the table. And there is a positive integer […]

Fox and Box Accumulation

2020 VietMX 0

Fox Ciel has n boxes in her room. They have the same size and weight, but they might have different strength. The i-th box can hold at most x i boxes […]

Fox and Perfect Sets

2020 VietMX 0

Fox Ciel studies number theory. She thinks a non-empty set S contains non-negative integers is perfect if and only if for any  ( a can be equal to b), . Where operation xor means exclusive or […]

Long Path

2020 VietMX 0

One day, little Vasya found himself in a maze consisting of (n + 1) rooms, numbered from 1 to (n + 1). Initially, Vasya is at the first room and to get out of […]

Triangle

2020 VietMX 0

There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane […]

Curious Array

2020 VietMX 0

You’ve got an array consisting of n integers: a[1], a[2], …, a[n]. Moreover, there are m queries, each query can be described by three integers l i, r i, k i. Query l i, r i, k i means that we should add  to each element a[j], where l i ≤ j ≤ r i. […]

Largest Submatrix 3

2020 VietMX 0

You are given matrix a of size n × m, its elements are integers. We will assume that the rows of the matrix are numbered from top to bottom from […]

The Great Game

2020 VietMX 0

Two teams meet in The Game World Championship. Some scientists consider this game to be the most intellectually challenging game in the world. You are […]

Magnum Opus

2020 VietMX 0

Salve, mi amice. Et tu quidem de lapis philosophorum. Barba non facit philosophum. Labor omnia vincit. Non potest creatio ex nihilo. Necesse est partibus. Rp: […]

A + B Strikes Back

2020 VietMX 0

A + B is often used as an example of the easiest problem possible to show some contest platform. However, some scientists have observed that […]

Big Data

2020 VietMX 0

Little Petya wanted to give an April Fools Day present to some scientists. After some hesitation he decided to give them the array that he […]

Dome

2020 VietMX 0

Input The input contains a single floating-point number x with exactly 6 decimal places (0 < x < 5). Output Output two integers separated by a single space. Each integer should […]

Football

2020 VietMX 0

One day, at the “Russian Code Cup” event it was decided to play football as an out of competition event. All participants was divided into n teams […]

Cunning Gena

2020 VietMX 0

A boy named Gena really wants to get to the “Russian Code Cup” finals, or at least get a t-shirt. But the offered problems are […]

Square Table

2020 VietMX 0

While resting on the ship after the “Russian Code Cup” a boy named Misha invented an interesting game. He promised to give his quadrocopter to […]

Pattern

2020 VietMX 0

Developers often face with regular expression patterns. A pattern is usually defined as a string consisting of characters and metacharacters that sets the rules for […]

Network Configuration

2020 VietMX 1

The R1 company wants to hold a web search championship. There were n computers given for the competition, each of them is connected to the Internet. The […]

Poster

2020 VietMX 0

The R1 company has recently bought a high rise building in the centre of Moscow for its main office. It’s time to decorate the new […]

Giving Awards

2020 VietMX 0

The employees of the R1 company often spend time together: they watch football, they go camping, they solve contests. So, it’s no big deal that […]