
T-shirt buying
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 […]
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 […]
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 […]
Butler Ostin wants to show Arkady that rows of odd number of fountains are beautiful, while rows of even number of fountains are not. The […]
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, […]
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 […]
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 […]
This is an interactive problem. You are given a sorted in increasing order singly linked list. You should find the minimum integer in the list which is […]
You are given a tree with n vertices and you are allowed to perform no more than 2n transformations on it. Transformation is defined by three vertices x, y, y‘ and consists of deleting […]
You are given a directed graph, consisting of n vertices and m edges. The vertices s and t are marked as source and sink correspondingly. Additionally, there are no edges ending at s and there […]
Due to the recent popularity of the Deep learning new countries are starting to look like Neural Networks. That is, the countries are being built […]
Consider an array A with N elements, all being the same integer a. Define the product transformation as a simultaneous update A i = A i·A i + 1, that is multiplying each element to the element right […]
John has just bought a new car and is planning a journey around the country. Country has N cities, some of which are connected by bidirectional roads. […]
Smith wakes up at the side of a dirty, disused bathroom, his ankle chained to pipes. Next to him is tape-player with a hand-written message […]
The competitors of Bubble Cup X gathered after the competition and discussed what is the best way to get to know the host country and […]
The citizens of BubbleLand are celebrating their 10th anniversary so they decided to organize a big music festival. Bob got a task to invite N famous singers […]
Vasya and Petya are playing an online game. As most online games, it has hero progress system that allows players to gain experience that make […]
Grigory loves strings. Recently he found a metal strip on a loft. The strip had length n and consisted of letters “V” and “K”. Unfortunately, rust has […]