Problem ID stringlengths 2 6 | Problem Description stringlengths 0 7.52k | Rating float64 800 3.5k | math bool 2
classes | greedy bool 2
classes | implementation bool 2
classes | dp bool 2
classes | data structures bool 2
classes | constructive algorithms bool 2
classes | brute force bool 2
classes | binary search bool 2
classes | sortings bool 2
classes | graphs bool 2
classes | __index_level_0__ int64 3 9.98k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1578E | Eonathan Eostar decided to learn the magic of multiprocessor systems. He has a full binary tree of tasks with height $$$h$$$. In the beginning, there is only one ready task in the treexa0β the task in the root. At each moment of time, $$$p$$$ processes choose at most $$$p$$$ ready tasks and perform them. After that, ta... | 1,200 | true | false | true | false | false | false | false | false | false | false | 2,750 |
1343F | We guessed a permutation $$$p$$$ consisting of $$$n$$$ integers. The permutation of length $$$n$$$ is the array of length $$$n$$$ where each element from $$$1$$$ to $$$n$$$ appears exactly once. This permutation is a secret for you. For each position $$$r$$$ from $$$2$$$ to $$$n$$$ we chose some other index $$$l$$$ ($$... | 2,400 | false | true | true | false | true | true | true | false | false | false | 3,988 |
1386C | Joker returns to Gotham City to execute another evil plan. In Gotham City, there are $$$N$$$ street junctions (numbered from $$$1$$$ to $$$N$$$) and $$$M$$$ streets (numbered from $$$1$$$ to $$$M$$$). Each street connects two distinct junctions, and two junctions are connected by at most one street. For his evil plan, ... | 2,800 | false | false | false | false | true | false | false | false | false | false | 3,738 |
555E | Andrewid the Android is a galaxy-known detective. Now he is preparing a defense against a possible attack by hackers on a major computer network. In this network are _n_ vertices, some pairs of vertices are connected by _m_ undirected channels. It is planned to transfer _q_ important messages via this network, the _i_-... | 2,800 | false | false | false | false | false | false | false | false | false | true | 7,611 |
617C | A flowerbed has many flowers and two fountains. You can adjust the water pressure and set any values _r_1(_r_1u2009β₯u20090) and _r_2(_r_2u2009β₯u20090), giving the distances at which the water is spread from the first and second fountain respectively. You have to set such _r_1 and _r_2 that all the flowers are watered, ... | 1,600 | false | false | true | false | false | false | false | false | false | false | 7,367 |
906A | Valentin participates in a show called "Shockers". The rules are quite easy: jury selects one letter which Valentin doesn't know. He should make a small speech, but every time he pronounces a word that contains the selected letter, he receives an electric shock. He can make guesses which letter is selected, but for eac... | 1,600 | false | false | true | false | false | false | false | false | false | false | 6,127 |
1765M | You are given an integer $$$n$$$. Your task is to find two positive (greater than $$$0$$$) integers $$$a$$$ and $$$b$$$ such that $$$a+b=n$$$ and the least common multiple (LCM) of $$$a$$$ and $$$b$$$ is the minimum among all possible values of $$$a$$$ and $$$b$$$. If there are multiple answers, you can print any of th... | 1,000 | true | false | false | false | false | false | false | false | false | false | 1,705 |
1741C | You are given a sequence $$$a=[a_1,a_2,dots,a_n]$$$ consisting of $$$n$$$ positive integers. Let's call a group of consecutive elements a segment. Each segment is characterized by two indices: the index of its left end and the index of its right end. Denote by $$$a[l,r]$$$ a segment of the sequence $$$a$$$ with the lef... | 1,100 | true | true | false | false | false | false | true | false | false | false | 1,836 |
140C | Problem - 140C - Codeforces =============== xa0 β the number of snowballs. The next line contains _n_ integers β the balls' radii _r_1, _r_2, ..., _r__n_ (1u2009β€u2009_r__i_u2009β€u2009109). The balls' radii can coincide. Output Print on the first line a single number _k_ β the maximum number of the snowme... | 1,800 | false | true | false | false | true | false | false | true | false | false | 9,316 |
1327F | You are given three integers $$$n$$$, $$$k$$$, $$$m$$$ and $$$m$$$ conditions $$$(l_1, r_1, x_1), (l_2, r_2, x_2), dots, (l_m, r_m, x_m)$$$. Calculate the number of distinct arrays $$$a$$$, consisting of $$$n$$$ integers such that: $$$0 le a_i < 2^k$$$ for each $$$1 le i le n$$$; bitwise AND of numbers $$$a[l_i] & a[... | 2,500 | false | false | false | true | true | false | false | false | false | false | 4,073 |
73D | Vasya plays FreeDiv. In this game he manages a huge state, which has _n_ cities and _m_ two-way roads between them. Unfortunately, not from every city you can reach any other one moving along these roads. Therefore Vasya decided to divide the state into provinces so that in every province, one could reach from every ci... | 2,200 | false | true | false | false | false | false | false | false | false | true | 9,599 |
1737E | Enter Register HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP RAYAN Dytechlab Cup 2022 Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've see... | 2,500 | true | false | false | true | false | false | false | false | false | false | 1,864 |
960C | Pikachu had an array with him. He wrote down all the non-empty subsequences of the array on paper. Note that an array of size _n_ has 2_n_u2009-u20091 non-empty subsequences in it. Pikachu being mischievous as he always is, removed all the subsequences in which Maximum_element_of_the_subsequence u2009-u2009 Minimum_ele... | 1,700 | false | true | true | false | false | true | false | false | false | false | 5,869 |
1548A | When you play the game of thrones, you win, or you die. There is no middle ground. Cersei Lannister, A Game of Thrones by George R.xa0R. Martin There are $$$n$$$ nobles, numbered from $$$1$$$ to $$$n$$$. Noble $$$i$$$ has a power of $$$i$$$. There are also $$$m$$$ "friendships". A friendship between nobles $$$a$$$ and ... | 1,400 | false | true | false | false | false | false | true | false | false | true | 2,906 |
1607A | You are given a keyboard that consists of $$$26$$$ keys. The keys are arranged sequentially in one row in a certain order. Each key corresponds to a unique lowercase Latin letter. You have to type the word $$$s$$$ on this keyboard. It also consists only of lowercase Latin letters. To type a word, you need to type all i... | 800 | false | false | true | false | false | false | false | false | false | false | 2,623 |
623C | Programmer Sasha is a student at MIPT (Moscow Institute of Physics and Technology) and he needs to make a laboratory work to pass his finals. A laboratory unit is a plane with standard coordinate axes marked on it. Physicists from Moscow Institute of Physics and Technology charged the axes by large electric charges: ax... | 2,900 | false | false | false | true | false | false | false | true | false | false | 7,338 |
585A | Gennady is one of the best child dentists in Berland. Today _n_ children got an appointment with him, they lined up in front of his office. All children love to cry loudly at the reception at the dentist. We enumerate the children with integers from 1 to _n_ in the order they go in the line. Every child is associated w... | 1,800 | false | false | true | false | false | false | true | false | false | false | 7,505 |
282E | The Bitlandians are quite weird people. They have their own problems and their own solutions. They have their own thoughts and their own beliefs, they have their own values and their own merits. They have their own dishes and their own sausages! In Bitland a sausage is an array of integers! A sausage's deliciousness is... | 2,200 | false | false | false | false | true | false | false | false | false | false | 8,704 |
1230B | Problem - 1230B - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - ... | 1,000 | false | true | true | false | false | false | false | false | false | false | 4,528 |
724C | There are _k_ sensors located in the rectangular room of size _n_u2009Γu2009_m_ meters. The _i_-th sensor is located at point (_x__i_,u2009_y__i_). All sensors are located at distinct points strictly inside the rectangle. Opposite corners of the room are located at points (0,u20090) and (_n_,u2009_m_). Walls of the roo... | 1,800 | true | true | true | false | false | false | false | false | true | false | 6,912 |
2002D1 | This is the easy version of the problem. In this version, the given tree is a perfect binary tree and the constraints on $$$n$$$ and $$$q$$$ are lower. You can make hacks only if both versions of the problem are solved. You are given a perfect binary tree$$$^dagger$$$ consisting of $$$n$$$ vertices. The vertices are nu... | 1,900 | false | false | false | false | true | false | true | false | false | true | 246 |
200B | Problem - 200B - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 800 | true | false | true | false | false | false | false | false | false | false | 9,043 |
384B | Iahub wants to enhance his multitasking abilities. In order to do this, he wants to sort _n_ arrays simultaneously, each array consisting of _m_ integers. Iahub can choose a pair of distinct indices _i_ and _j_ (1u2009β€u2009_i_,u2009_j_u2009β€u2009_m_,u2009_i_u2009β u2009_j_). Then in each array the values at positions _... | 1,500 | false | true | true | false | false | false | false | false | true | false | 8,292 |
769D | Vasya has the sequence consisting of _n_ integers. Vasya consider the pair of integers _x_ and _y_ k-interesting, if their binary representation differs from each other exactly in _k_ bits. For example, if _k_u2009=u20092, the pair of integers _x_u2009=u20095 and _y_u2009=u20093 is k-interesting, because their binary r... | 1,700 | false | false | false | false | false | false | true | false | false | false | 6,703 |
1370D | # Odd-Even Subsequence Input file: standard input Output file: standard output Time limit: 2 seconds Memory limit: 256 megabytes Ashish has an array a of size n.A subsequence of a is defined as a sequence that can be obtained from a by deleting some elements (possibly none), without changing the order of the remaini... | 2,000 | false | true | true | true | false | false | false | true | false | false | 3,818 |
743D | Generous sponsors of the olympiad in which Chloe and Vladik took part allowed all the participants to choose a prize for them on their own. Christmas is coming, so sponsors decided to decorate the Christmas tree with their prizes. They took _n_ prizes for the contestants and wrote on each of them a unique id (integer f... | 1,800 | false | false | false | true | false | false | false | false | false | true | 6,826 |
1146A | Problem - 1146A - Codeforces =============== xa0 ]( "Forethought Future Cup") are not. Alice can erase some characters from her string $$$s$$$. She would like to know what is the longest string remaining after erasing some characters (possibly zero) to get a good string. It is guaranteed that the string ha... | 800 | false | false | true | false | false | false | false | false | false | false | 4,991 |
2023C | You are given two strongly connected$$$^{dagger}$$$ directed graphs, each with exactly $$$n$$$ vertices, but possibly different numbers of edges. Upon closer inspection, you noticed an important feature β the length of any cycle in these graphs is divisible by $$$k$$$. Each of the $$$2n$$$ vertices belongs to exactly o... | 2,400 | false | true | true | false | false | true | false | false | false | true | 129 |
364A | Problem - 364A - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,600 | false | false | true | false | true | false | false | false | false | false | 8,377 |
757A | Bash wants to become a Pokemon master one day. Although he liked a lot of Pokemon, he has always been fascinated by Bulbasaur the most. Soon, things started getting serious and his fascination turned into an obsession. Since he is too young to go out and catch Bulbasaur, he came up with his own way of catching a Bulbas... | 1,000 | false | false | true | false | false | false | false | false | false | false | 6,764 |
1815F | You are given an undirected graph with $$$n$$$ vertices and $$$3m$$$ edges. The graph may contain multi-edges, but does not contain self-loops. The graph satisfies the following property: the given edges can be divided into $$$m$$$ groups of $$$3$$$, such that each group is a triangle. A triangle is defined as three ed... | 3,500 | true | false | false | false | false | true | false | false | false | true | 1,376 |
1700A | You are given a table $$$a$$$ of size $$$n imes m$$$. We will consider the table rows numbered from top to bottom from $$$1$$$ to $$$n$$$, and the columns numbered from left to right from $$$1$$$ to $$$m$$$. We will denote a cell that is in the $$$i$$$-th row and in the $$$j$$$-th column as $$$(i, j)$$$. In the cell $... | 800 | true | true | false | false | false | true | false | false | false | false | 2,082 |
106D | Our brave travelers reached an island where pirates had buried treasure. However as the ship was about to moor, the captain found out that some rat ate a piece of the treasure map. The treasure map can be represented as a rectangle _n_u2009Γu2009_m_ in size. Each cell stands for an islands' square (the square's side le... | 1,700 | false | false | true | false | false | false | true | false | false | false | 9,458 |
869E | Adieu l'ami. Koyomi is helping Oshino, an acquaintance of his, to take care of an open space around the abandoned Eikou Cram School building, Oshino's makeshift residence. The space is represented by a rectangular grid of _n_u2009Γu2009_m_ cells, arranged into _n_ rows and _m_ columns. The _c_-th cell in the _r_-th row... | 2,400 | false | false | false | false | true | false | false | false | false | false | 6,262 |
229D | The city of D consists of _n_ towers, built consecutively on a straight line. The height of the tower that goes _i_-th (from left to right) in the sequence equals _h__i_. The city mayor decided to rebuild the city to make it beautiful. In a beautiful city all towers are are arranged in non-descending order of their hei... | 2,100 | false | true | false | true | false | false | false | false | false | false | 8,920 |
1477D | Nezzar designs a brand new game "Hidden Permutations" and shares it with his best friend, Nanako. At the beginning of the game, Nanako and Nezzar both know integers $$$n$$$ and $$$m$$$. The game goes in the following way: Firstly, Nezzar hides two permutations $$$p_1,p_2,ldots,p_n$$$ and $$$q_1,q_2,ldots,q_n$$$ of int... | 2,800 | false | false | false | false | false | true | false | false | false | true | 3,287 |
158C | Vasya is writing an operating system shell, and it should have commands for working with directories. To begin with, he decided to go with just two commands: cd (change the current directory) and pwd (display the current directory). Directories in Vasya's operating system form a traditional hierarchical tree structure.... | 1,400 | false | false | true | false | true | false | false | false | false | false | 9,243 |
587D | Duff is one if the heads of Mafia in her country, Andarz Gu. Andarz Gu has _n_ cities (numbered from 1 to _n_) connected by _m_ bidirectional roads (numbered by 1 to _m_). Each road has a destructing time, and a color. _i_-th road connects cities _v__i_ and _u__i_ and its color is _c__i_ and its destructing time is _t_... | 3,100 | false | false | false | false | false | false | false | true | false | false | 7,494 |
149B | Having stayed home alone, Petya decided to watch forbidden films on the Net in secret. "What ungentlemanly behavior!" β you can say that, of course, but don't be too harsh on the kid. In his country films about the Martians and other extraterrestrial civilizations are forbidden. It was very unfair to Petya as he adored... | 1,600 | false | false | true | false | false | false | false | false | false | false | 9,280 |
356B | Xenia is an amateur programmer. Today on the IT lesson she learned about the Hamming distance. The Hamming distance between two strings _s_u2009=u2009_s_1_s_2... _s__n_ and _t_u2009=u2009_t_1_t_2... _t__n_ of equal length _n_ is value . Record [_s__i_u2009β u2009_t__i_] is the Iverson notation and represents the followi... | 1,900 | true | false | true | false | false | false | false | false | false | false | 8,410 |
1423B | The pandemic is upon us, and the world is in shortage of the most important resource: toilet paper. As one of the best prepared nations for this crisis, BubbleLand promised to help all other world nations with this valuable resource. To do that, the country will send airplanes to other countries carrying toilet paper. ... | 1,900 | false | false | false | false | false | false | false | true | false | true | 3,562 |
224B | You've got an array _a_, consisting of _n_ integers: _a_1,u2009_a_2,u2009...,u2009_a__n_. Your task is to find a minimal by inclusion segment [_l_,u2009_r_] (1u2009β€u2009_l_u2009β€u2009_r_u2009β€u2009_n_) such, that among numbers _a__l_,u2009xa0_a__l_u2009+u20091,u2009xa0...,u2009xa0_a__r_ there are exactly _k_ distinct ... | 1,500 | false | false | true | false | false | false | false | false | false | false | 8,941 |
120C | Problem - 120C - Codeforces =============== xa0 . The second line contains _n_ integers _a_1, _a_2, ..., _a__n_, separated by spaces (1u2009β€u2009_a__i_u2009β€u2009100). Output Print a single number β how many kilos of honey gets Piglet. Examples Input 3 3 15 8 10 Output 9 | 1,100 | true | false | true | false | false | false | false | false | false | false | 9,404 |
844A | Problem - 844A - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,000 | false | true | true | false | false | false | false | false | false | false | 6,386 |
688A | Arya has _n_ opponents in the school. Each day he will fight with all opponents who are present this day. His opponents have some fighting plan that guarantees they will win, but implementing this plan requires presence of them all. That means if one day at least one of Arya's opponents is absent at the school, then Ar... | 800 | false | false | true | false | false | false | false | false | false | false | 7,071 |
1536E | Omkar's most recent follower, Ajit, has entered the Holy Forest. Ajit realizes that Omkar's forest is an $$$n$$$ by $$$m$$$ grid ($$$1 leq n, m leq 2000$$$) of some non-negative integers. Since the forest is blessed by Omkar, it satisfies some special conditions: 1. For any two adjacent (sharing a side) cells, the abso... | 2,300 | true | false | false | false | false | false | false | false | false | true | 2,964 |
1883A | You are given a four-digit pin code consisting of digits from $$$0$$$ to $$$9$$$ that needs to be entered. Initially, the cursor points to the digit $$$1$$$. In one second, you can perform exactly one of the following two actions: Press the cursor to display the current digit, Move the cursor to any adjacent digit. T... | 800 | true | false | false | false | false | false | false | false | false | false | 991 |
1761A | You are given three integers $$$n$$$, $$$a$$$, and $$$b$$$. Determine if there exist two permutations $$$p$$$ and $$$q$$$ of length $$$n$$$, for which the following conditions hold: The length of the longest common prefix of $$$p$$$ and $$$q$$$ is $$$a$$$. The length of the longest common suffix of $$$p$$$ and $$$q$$... | 800 | false | false | false | false | false | true | true | false | false | false | 1,748 |
1030F | There is an infinite line consisting of cells. There are $$$n$$$ boxes in some cells of this line. The $$$i$$$-th box stands in the cell $$$a_i$$$ and has weight $$$w_i$$$. All $$$a_i$$$ are distinct, moreover, $$$a_{i - 1} < a_i$$$ holds for all valid $$$i$$$. You would like to put together some boxes. Putting togethe... | 2,500 | false | false | false | false | true | false | false | false | false | false | 5,550 |
1029F | There is an infinite board of square tiles. Initially all tiles are white. Vova has a red marker and a blue marker. Red marker can color $$$a$$$ tiles. Blue marker can color $$$b$$$ tiles. If some tile isn't white then you can't use marker of any color on it. Each marker must be drained completely, so at the end there ... | 2,000 | true | false | false | false | false | false | true | true | false | false | 5,556 |
1148A | Problem - 1148A - Codeforces =============== xa0 xa0β the number of strings "a", "b" and "ab" respectively. Output Print a single numberxa0β the maximum possible length of the good string you can obtain. Examples Input 1 1 1 Output 4 Input 2 1 2 Output 7 Input 3 5 2 Output 11 Input 2 2 1 Output 6 Input 10... | 800 | false | true | false | false | false | false | false | false | false | false | 4,977 |
609A | Problem - 609A - Codeforces =============== xa0 ]( "Educational Codeforces Round 3") β the number of USB flash drives. The second line contains positive integer _m_ (1u2009β€u2009_m_u2009β€u2009105) β the size of Sean's file. Each of the next _n_ lines contains positive integer _a__i_ (1u2009β€u2009_a__i_u200... | 800 | false | true | true | false | false | false | false | false | true | false | 7,412 |
1984C2 | The two versions of the problem are different. You may want to read both versions. You can make hacks only if both versions are solved. You are given an array $$$a$$$ of length $$$n$$$. Start with $$$c = 0$$$. Then, for each $$$i$$$ from $$$1$$$ to $$$n$$$ (in increasing order) do exactly one of the following: Option ... | 1,700 | true | true | false | true | false | false | false | false | false | false | 380 |
1673D | Long ago, you thought of two finite denoting the number of testcases. The first line of each testcase contains three integers $$$b$$$, $$$q$$$ and $$$y$$$ ($$$-10^9leq bleq 10^9$$$, $$$1leq qleq 10^9$$$, $$$2leq yleq 10^9$$$) denoting the first term, common difference and number of terms of $$$B$$$ respectively. The se... | 1,900 | true | false | false | false | false | false | false | false | false | false | 2,232 |
230A | Kirito is stuck on a level of the MMORPG he is playing now. To move on in the game, he's got to defeat all _n_ dragons that live on this level. Kirito and the dragons have strength, which is represented by an integer. In the duel between two opponents the duel's outcome is determined by their strength. Initially, Kirit... | 1,000 | false | true | false | false | false | false | false | false | true | false | 8,918 |
2035C | Alya has been given a hard problem. Unfortunately, she is too busy running for student council. Please solve this problem for her. Given an integer $$$n$$$, construct a permutation $$$p$$$ of integers $$$1, 2, ldots, n$$$ that maximizes the value of $$$k$$$ (which is initially $$$0$$$) after the following process. Perf... | 1,400 | true | false | false | false | false | true | false | false | false | false | 59 |
1931E | Sasha gave Anna a list $$$a$$$ of $$$n$$$ integers for Valentine's Day. Anna doesn't need this list, so she suggests destroying it by playing a game. Players take turns. Sasha is a gentleman, so he gives Anna the right to make the first move. On her turn, Anna must choose an element $$$a_i$$$ from the list and reverse... | 1,400 | true | true | false | false | false | false | false | false | true | false | 697 |
1992C | Gorilla and Noobish_Monk found three numbers $$$n$$$, $$$m$$$, and $$$k$$$ ($$$m < k$$$). They decided to construct a permutation$$$^{dagger}$$$ of length $$$n$$$. For the permutation, Noobish_Monk came up with the following function: $$$g(i)$$$ is the sum of all the numbers in the permutation on a prefix of length $$$... | 900 | true | false | false | false | false | true | false | false | false | false | 317 |
855A | Harry Potter is on a mission to destroy You-Know-Who's Horcruxes. The first Horcrux that he encountered in the Chamber of Secrets is Tom Riddle's diary. The diary was with Ginny and it forced her to open the Chamber of Secrets. Harry wants to know the different people who had ever possessed the diary to make sure they ... | 800 | false | false | true | false | false | false | true | false | false | false | 6,327 |
1821C | You are given a string $$$s$$$, consisting of lowercase Latin letters. In one operation, you can select several (one or more) positions in it such that no two selected positions are adjacent to each other. Then you remove the letters on the selected positions from the string. The resulting parts are concatenated withou... | 1,300 | true | false | true | false | false | false | true | false | false | false | 1,355 |
1185F | A company of $$$n$$$ friends wants to order exactly two pizzas. It is known that in total there are $$$9$$$ pizza ingredients in nature, which are denoted by integers from $$$1$$$ to $$$9$$$. Each of the $$$n$$$ friends has one or more favorite ingredients: the $$$i$$$-th of friends has the number of favorite ingredien... | 2,100 | false | false | false | false | false | false | true | false | false | false | 4,774 |
1363A | Shubham has an array $$$a$$$ of size $$$n$$$, and wants to select exactly $$$x$$$ elements from it, such that their sum is odd. These elements do not have to be consecutive. The elements of the array are not guaranteed to be distinct. Tell him whether he can do so. Input The first line of the input contains a single in... | 1,200 | true | false | true | false | false | false | true | false | false | false | 3,868 |
1250E | The coronation of King Berl XXII is soon! The whole royal family, including $$$n$$$ daughters of Berl XXII, will be present. The King has ordered his jeweler to assemble $$$n$$$ beautiful necklaces, so each of the princesses could wear exactly one necklace during the ceremony β and now these necklaces are finished. Eac... | 2,300 | false | false | true | false | false | false | false | false | false | true | 4,451 |
1517H | After hearing the story of Dr. Zhang, Wowo decides to plan his own flight around the world. He already chose $$$n$$$ checkpoints in the world map. Due to the landform and the clouds, he cannot fly too high or too low. Formally, let $$$b_i$$$ be the height of Wowo's aircraft at checkpoint $$$i$$$, $$$x_i^-le b_ile x_i^+... | 3,500 | false | false | false | true | false | false | false | false | false | false | 3,070 |
691C | Problem - 691C - Codeforces =============== xa0 | 1,800 | false | false | true | false | false | false | false | false | false | false | 7,045 |
1003B | Problem - 1003B - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - ... | 1,300 | false | false | false | false | false | true | false | false | false | false | 5,673 |
123A | Problem - 123A - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,300 | false | false | true | false | false | false | false | false | false | false | 9,389 |
573B | Problem - 573B - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,600 | true | false | false | true | true | false | false | true | false | false | 7,558 |
486E | The next "Data Structures and Algorithms" lesson will be about Longest Increasing Subsequence (LIS for short) of a sequence. For better understanding, Nam decided to learn it a few days before the lesson. Nam created a sequence _a_ consisting of _n_ (1u2009β€u2009_n_u2009β€u2009105) elements _a_1,u2009_a_2,u2009...,u2009... | 2,200 | true | true | false | true | true | false | false | false | false | false | 7,891 |
1575M | Mr. Chanek's city can be represented as a plane. He wants to build a housing complex in the city. There are some telephone poles on the plane, which is represented by a grid $$$a$$$ of size $$$(n + 1) imes (m + 1)$$$. There is a telephone pole at $$$(x, y)$$$ if $$$a_{x, y} = 1$$$. For each point $$$(x, y)$$$, define ... | 2,400 | false | false | false | false | true | false | false | false | false | false | 2,756 |
1618B | Polycarp has come up with a new game to play with you. He calls it "A missing bigram". A bigram of a word is a sequence of two adjacent letters in it. For example, word "abbaaba" contains bigrams "ab", "bb", "ba", "aa", "ab" and "ba". The game goes as follows. First, Polycarp comes up with a word, consisting only of lo... | 800 | false | false | true | false | false | false | false | false | false | false | 2,541 |
1955A | Problem - 1955A - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - ... | 800 | true | false | false | false | false | false | false | false | false | false | 548 |
723D | The map of Berland is a rectangle of the size _n_u2009Γu2009_m_, which consists of cells of size 1u2009Γu20091. Each cell is either land or water. The map is surrounded by the ocean. Lakes are the maximal regions of water cells, connected by sides, which are not connected with the ocean. Formally, lake is a set of wate... | 1,600 | false | true | true | false | false | false | false | false | false | true | 6,917 |
557C | Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable. In total the table Arthur bought has _n_ legs, the length of the _i_-th leg is _l__i_. Arthur decided to make the table stable and remove some legs. For each of them Arthur determined number _d__... | 1,900 | true | true | false | true | true | false | true | false | true | false | 7,606 |
633D | Problem - 633D - Codeforces =============== xa0 ]( "Announcement") xa0β the length of the sequence _a__i_. The second line contains _n_ integers _a_1,u2009_a_2,u2009...,u2009_a__n_ (_a__i_u2009β€u2009109). Output Print the length of the longest possible Fibonacci-ish prefix of the given sequence after rearr... | 2,000 | true | false | true | true | false | false | true | false | false | false | 7,272 |
1305A | Kuroni has $$$n$$$ daughters. As gifts for them, he bought $$$n$$$ necklaces and $$$n$$$ bracelets: the $$$i$$$-th necklace has a brightness $$$a_i$$$, where all the $$$a_i$$$ are pairwise distinct (i.e. all $$$a_i$$$ are different), the $$$i$$$-th bracelet has a brightness $$$b_i$$$, where all the $$$b_i$$$ are pair... | 800 | false | true | false | false | false | true | true | false | true | false | 4,164 |
72B | The INI file format is a de facto standard for configuration files. INI files are simple text files with a basic structure. They are commonly associated with Microsoft Windows, but are also used on other platforms. Each line in INI-file stands for key-value mapping or defines new section. A key-value line has a format ... | 2,200 | false | false | true | false | false | false | false | false | false | false | 9,610 |
913C | A New Year party is not a New Year party without lemonade! As usual, you are expecting a lot of guests, and buying lemonade has already become a pleasant necessity. Your favorite store sells lemonade in bottles of _n_ different volumes at different costs. A single bottle of type _i_ has volume 2_i_u2009-u20091 liters a... | 1,600 | false | true | false | true | false | false | false | false | false | false | 6,089 |
135C | Little Petya very much likes playing with little Masha. Recently he has received a game called "Zero-One" as a gift from his mother. Petya immediately offered Masha to play the game with him. Before the very beginning of the game several cards are lain out on a table in one line from the left to the right. Each card co... | 1,900 | false | true | false | false | false | true | false | false | false | false | 9,335 |
279C | You've got an array, consisting of _n_ integers _a_1,u2009_a_2,u2009...,u2009_a__n_. Also, you've got _m_ queries, the _i_-th query is described by two integers _l__i_,u2009_r__i_. Numbers _l__i_,u2009_r__i_ define a subsegment of the original array, that is, the sequence of numbers _a__l__i_,u2009_a__l__i_u2009+u20091... | 1,700 | false | false | true | true | false | false | false | false | false | false | 8,718 |
382C | Everybody knows what an arithmetic progression is. Let us remind you just in case that an arithmetic progression is such sequence of numbers _a_1,u2009_a_2,u2009...,u2009_a__n_ of length _n_, that the following condition fulfills: _a_2u2009-u2009_a_1u2009=u2009_a_3u2009-u2009_a_2u2009=u2009_a_4u2009-u2009_a_3u2009=u200... | 1,700 | false | false | true | false | false | false | false | false | true | false | 8,301 |
615B | This Christmas Santa gave Masha a magic picture and a pencil. The picture consists of _n_ points connected by _m_ segments (they might cross in any way, that doesn't matter). No two segments connect the same pair of points, and no segment connects the point to itself. Masha wants to color some segments in order paint a... | 1,600 | false | false | false | true | false | false | false | false | false | true | 7,379 |
1926G | Vladislav has a son who really wanted to go to MIT. The college dormitory at MIT (Moldova Institute of Technology) can be represented as a tree with $$$n$$$ vertices, each vertex being a room with exactly one student. A tree is a connected undirected graph with $$$n$$$ vertices and $$$n-1$$$ edges. Tonight, there are t... | 1,900 | false | true | true | true | false | false | false | false | false | true | 731 |
1237C2 | This is a harder version of the problem. In this version, $$$n le 50,000$$$. There are $$$n$$$ distinct points in three-dimensional space numbered from $$$1$$$ to $$$n$$$. The $$$i$$$-th point has coordinates $$$(x_i, y_i, z_i)$$$. The number of points $$$n$$$ is even. You'd like to remove all $$$n$$$ points using a se... | 1,900 | false | true | true | false | false | true | false | true | true | false | 4,509 |
1927E | You are given two integers $$$n$$$ and $$$k$$$ ($$$k le n$$$), where $$$k$$$ is even. A permutation of length $$$n$$$ is an array consisting of $$$n$$$ distinct integers from $$$1$$$ to $$$n$$$ in any order. For example, $$$[2,3,1,5,4]$$$ is a permutation, but $$$[1,2,2]$$$ is not a permutation (as $$$2$$$ appears twic... | 1,400 | true | false | false | false | false | true | false | false | false | false | 726 |
1439B | You are given an undirected graph with $$$n$$$ vertices and $$$m$$$ edges. Also, you are given an integer $$$k$$$. Find either a clique of size $$$k$$$ or a non-empty subset of vertices such that each vertex of this subset has at least $$$k$$$ neighbors in the subset. If there are no such cliques and subsets report abo... | 2,600 | false | false | false | false | true | true | false | false | false | true | 3,470 |
1715B | Stanley defines the beauty of an array $$$a$$$ of length $$$n$$$, which contains non-negative integers, as follows: $$$$$$sumlimits_{i = 1}^{n} left lfloor frac{a_{i}}{k} ight floor,$$$$$$ which means that we divide each element by $$$k$$$, round it down, and sum up the resulting values. Stanley told Sam the integer ... | 1,000 | true | true | false | false | false | true | false | false | false | false | 1,992 |
352B | Problem - 352B - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,300 | false | false | true | false | false | false | false | false | true | false | 8,424 |
802M | Problem - 802M - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,200 | false | true | false | false | false | false | false | false | true | false | 6,555 |
788E | On the 228-th international Uzhlyandian Wars strategic game tournament teams from each country are called. The teams should consist of 5 participants. The team of Uzhlyandia will consist of soldiers, because there are no gamers. Masha is a new minister of defense and gaming. The prime duty of the minister is to calcula... | 2,900 | false | false | false | false | true | false | false | false | false | false | 6,617 |
755E | PolandBall has an undirected simple graph consisting of _n_ vertices. Unfortunately, it has no edges. The graph is very sad because of that. PolandBall wanted to make it happier, adding some red edges. Then, he will add white edges in every remaining place. Therefore, the final graph will be a clique in two colors: whi... | 2,400 | false | false | false | false | false | true | false | false | false | true | 6,773 |
456A | Problem - 456A - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,100 | false | false | false | false | false | false | false | false | true | false | 8,014 |
315B | Sereja has got an array, consisting of _n_ integers, _a_1,u2009_a_2,u2009...,u2009_a__n_. Sereja is an active boy, so he is now going to complete _m_ operations. Each operation will have one of the three forms: 1. Make _v__i_-th array element equal to _x__i_. In other words, perform the assignment _a__v__i_u2009=u2009_... | 1,200 | false | false | true | false | false | false | false | false | false | false | 8,584 |
1913D | You are given an array $$$[p_1, p_2, dots, p_n]$$$, where all elements are distinct. You can perform several (possibly zero) operations with it. In one operation, you can choose a contiguous subsegment of $$$p$$$ and remove all elements from that subsegment, except for the minimum element on that subsegment. For exampl... | 2,100 | false | false | false | true | true | false | false | false | false | false | 822 |
750E | A string _t_ is called nice if a string "2017" occurs in _t_ as a subsequence but a string "2016" doesn't occur in _t_ as a subsequence. For example, strings "203434107" and "9220617" are nice, while strings "20016", "1234" and "20167" aren't nice. The ugliness of a string is the minimum possible number of characters t... | 2,600 | false | false | false | true | true | false | false | false | false | false | 6,789 |
1712C | An array is sorted if it has no inversions A Young Boy You are given an array of $$$n$$$ positive integers $$$a_1,a_2,ldots,a_n$$$. In one operation you do the following: 1. Choose any integer $$$x$$$. 2. For all $$$i$$$ such that $$$a_i = x$$$, do $$$a_i := 0$$$ (assign $$$0$$$ to $$$a_i$$$). Find the minimum number o... | 1,100 | false | true | false | false | false | false | false | false | true | false | 2,011 |
1326G | Let's call a graph with $$$n$$$ vertices, each of which has it's own point $$$A_i = (x_i, y_i)$$$ with integer coordinates, a planar tree if: All points $$$A_1, A_2, ldots, A_n$$$ are different and no three points lie on the same line. The graph is a tree, i.e. there are exactly $$$n-1$$$ edges there exists a path be... | 3,500 | false | false | false | true | false | false | false | false | false | false | 4,079 |
748A | Santa Claus is the first who came to the Christmas Olympiad, and he is going to be the first to take his place at a desk! In the classroom there are _n_ lanes of _m_ desks each, and there are two working places at each of the desks. The lanes are numbered from 1 to _n_ from the left to the right, the desks in a lane ar... | 800 | true | false | true | false | false | false | false | false | false | false | 6,804 |
1210G | Mateusz likes to travel! However, on his $$$42$$$nd visit to Saint Computersburg there is not much left to sightsee. That's why he decided to go to an escape room with his friends! The team has solved all riddles flawlessly. There is only one riddle remaining β a huge circular table! There are $$$n$$$ weighing scales l... | 3,500 | false | false | false | true | false | false | false | false | false | false | 4,629 |
915C | Problem - 915C - Codeforces =============== xa0 ]( --- Finished β Virtual participation Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - s... | 1,700 | false | true | false | true | false | false | false | false | false | false | 6,073 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.