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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
56C | Problem - 56C - 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 - so... | 1,700 | false | false | true | false | true | false | false | false | false | false | 9,693 |
23C | Problem - 23C - Codeforces =============== xa0 . The sum of _N_ in all the tests in the input doesn't exceed 105. All the input numbers are integer. Output For each test output two lines. In the first line output YES, if it's possible to choose _N_ boxes, or NO otherwise. If the answer is positive output ... | 2,500 | false | false | false | false | false | true | false | false | true | false | 9,881 |
1886A | Monocarp has an integer $$$n$$$. He wants to represent his number as a sum of three distinct positive integers $$$x$$$, $$$y$$$, and $$$z$$$. Additionally, Monocarp wants none of the numbers $$$x$$$, $$$y$$$, and $$$z$$$ to be divisible by $$$3$$$. Your task is to help Monocarp to find any valid triplet of distinct pos... | 800 | true | false | false | false | false | true | true | false | false | false | 977 |
2038G | This is an interactive problem. You have to use flush operation right after printing each line. For example, in C++ you should use the function fflush(stdout) or cout.flush(), in Java or Kotlin β System.out.flush(), and in Python β sys.stdout.flush(). The jury has a string $$$s$$$ consisting of characters 0 and/or 1. T... | 1,900 | false | false | true | false | false | true | false | false | false | false | 32 |
171C | Problem - 171C - Codeforces =============== xa0 . Output Output a single integer. Examples Input 4 1 2 3 4 Output 30 | 2,000 | false | false | true | false | false | false | false | false | false | false | 9,184 |
1599A | You are given an array $$$A$$$ of length $$$N$$$ weights of masses $$$A_1$$$, $$$A_2$$$...$$$A_N$$$.u202fNo two weights have the same mass. You can put every weight on one side of the balance (left or right).u202fYouu202fdon't have to putu202fweightsu202fin order $$$A_1$$$,...,$$$A_N$$$.u202fThere is also au202fstring ... | 2,600 | false | true | false | false | false | true | false | false | false | false | 2,664 |
1612G | You are given an array $$$c = [c_1, c_2, dots, c_m]$$$. An array $$$a = [a_1, a_2, dots, a_n]$$$ is constructed in such a way that it consists of integers $$$1, 2, dots, m$$$, and for each $$$i in [1,m]$$$, there are exactly $$$c_i$$$ occurrences of integer $$$i$$$ in $$$a$$$. So, the number of elements in $$$a$$$ is e... | 2,500 | false | true | false | false | false | true | false | false | true | false | 2,577 |
1046F | After finding and moving to the new planet that supports human life, discussions started on which currency should be used. After long negotiations, Bitcoin was ultimately chosen as the universal currency. These were the great news for Alice, whose grandfather got into Bitcoin mining in 2013, and accumulated a lot of th... | 1,400 | false | false | true | false | false | false | false | false | false | false | 5,459 |
979B | After the big birthday party, Katie still wanted Shiro to have some more fun. Later, she came up with a game called treasure hunt. Of course, she invited her best friends Kuro and Shiro to play with her. The three friends are very smart so they passed all the challenges very quickly and finally reached the destination.... | 1,800 | false | true | false | false | false | false | false | false | false | false | 5,810 |
1913A | Monocarp is a great solver of adhoc problems. Recently, he participated in an Educational Codeforces Round, and gained rating! Monocarp knew that, before the round, his rating was $$$a$$$. After the round, it increased to $$$b$$$ ($$$b > a$$$). He wrote both values one after another to not forget them. However, he wrot... | 800 | false | false | true | false | false | false | false | false | false | false | 825 |
1341B | On February 14 Denis decided to give Valentine to Nastya and did not come up with anything better than to draw a huge red heart on the door of the length $$$k$$$ ($$$k ge 3$$$). Nastya was very confused by this present, so she decided to break the door, throwing it on the mountains. Mountains are described by a sequenc... | 1,300 | false | true | true | false | false | false | false | false | false | false | 4,000 |
1101A | Problem - 1101A - 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 | true | false | false | false | false | false | false | false | false | false | 5,200 |
1994G | After winning another Bed Wars game, Masha and Olya wanted to relax and decided to play a new game. Masha gives Olya an array $$$a$$$ of length $$$n$$$ and a number $$$s$$$. Now Olya's task is to find a non-negative number $$$x$$$ such that $$$displaystylesum_{i=1}^{n} a_i oplus x = s$$$. But she is very tired after a ... | 2,600 | true | false | false | true | false | false | true | false | false | true | 299 |
1923F | You are given a binary string $$$s$$$ of length $$$n$$$ (a string consisting of $$$n$$$ characters, and each character is either 0 or 1). Let's look at $$$s$$$ as at a binary representation of some integer, and name that integer as the value of string $$$s$$$. For example, the value of 000 is $$$0$$$, the value of 0110... | 2,800 | false | true | true | false | false | false | true | true | false | false | 747 |
1103A | Problem - 1103A - 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,400 | false | false | true | false | false | true | false | false | false | false | 5,187 |
1623E | A binary tree of $$$n$$$ nodes is given. Nodes of the tree are numbered from $$$1$$$ to $$$n$$$ and the root is the node $$$1$$$. Each node can have no child, only one left child, only one right child, or both children. For convenience, let's denote $$$l_u$$$ and $$$r_u$$$ as the left and the right child of the node $$... | 2,500 | false | true | false | false | true | false | false | false | false | false | 2,501 |
729B | Theater stage is a rectangular field of size _n_u2009Γu2009_m_. The director gave you the stage's plan which actors will follow. For each cell it is stated in the plan if there would be an actor in this cell or not. You are to place a spotlight on the stage in some good position. The spotlight will project light in one... | 1,200 | false | false | true | true | false | false | false | false | false | false | 6,893 |
266C | You are given a square matrix consisting of _n_ rows and _n_ columns. We assume that the rows are numbered from 1 to _n_ from top to bottom and the columns are numbered from 1 to _n_ from left to right. Some cells (_n_u2009-u20091 cells in total) of the the matrix are filled with ones, the remaining cells are filled wi... | 2,100 | true | true | false | false | false | true | false | false | false | false | 8,769 |
1156G | Let's analyze a program written on some strange programming language. The variables in this language have names consisting of $$$1$$$ to $$$4$$$ characters, and each character is a lowercase or an uppercase Latin letter, or a digit. There is an extra constraint that the first character should not be a digit. There are ... | 2,700 | false | true | true | false | false | false | false | false | false | true | 4,924 |
2039A | Shohag has an integer $$$n$$$. Please help him find an increasing integer sequence $$$1 le a_1 lt a_2 lt ldots lt a_n le 100$$$ such that $$$a_i bmod i eq a_j bmod j$$$ $$$^{ ext{β}}$$$ is satisfied over all pairs $$$1 le i lt j le n$$$. It can be shown that such a sequence always exists under the given constraints. $... | 800 | false | false | false | false | false | true | false | false | false | false | 24 |
1545D | Cirno gives AquaMoon a problem. There are $$$m$$$ people numbered from $$$0$$$ to $$$m - 1$$$. They are standing on a coordinate axis in points with positive integer coordinates. They are facing right (i.e. in the direction of the coordinate increase). At this moment everyone will start running with the constant speed ... | 3,000 | true | false | false | false | false | true | false | false | false | false | 2,919 |
1891B | You are given an array $$$a$$$ of length $$$n$$$, consisting of positive integers, and an array $$$x$$$ of length $$$q$$$, also consisting of positive integers. There are $$$q$$$ modification. On the $$$i$$$-th modification ($$$1 leq i leq q$$$), for each $$$j$$$ ($$$1 leq j leq n$$$), such that $$$a_j$$$ is divisible ... | 1,100 | true | false | false | false | false | false | true | false | true | false | 956 |
146B | Problem - 146B - 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 | true | false | false | false | 9,289 |
1883C | You are given an array of integers $$$a_1, a_2, ldots, a_n$$$ and a number $$$k$$$ ($$$2 leq k leq 5$$$). In one operation, you can do the following: Choose an index $$$1 leq i leq n$$$, Set $$$a_i = a_i + 1$$$. Find the minimum number of operations needed to make the product of all the numbers in the array $$$a_1 cd... | 1,000 | true | false | false | true | false | false | false | false | false | false | 989 |
201D | A widely known among some people Belarusian sport programmer Lesha decided to make some money to buy a one square meter larger flat. To do this, he wants to make and carry out a Super Rated Match (SRM) on the site Torcoder.com. But there's a problem β a severe torcoder coordinator Ivan does not accept any Lesha's probl... | 2,600 | false | false | false | true | false | false | true | false | false | false | 9,036 |
1861E | Problem - 1861E - 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 - ... | 2,300 | true | false | true | true | false | false | false | false | false | false | 1,115 |
731C | Arseniy is already grown-up and independent. His mother decided to leave him alone for _m_ days and left on a vacation. She have prepared a lot of food, left some money and washed all Arseniy's clothes. Ten minutes before her leave she realized that it would be also useful to prepare instruction of which particular clo... | 1,600 | false | true | false | false | false | false | false | false | false | true | 6,874 |
295B | Greg has a weighed directed graph, consisting of _n_ vertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph and now he has invented a new game: The game consists of _n_ steps. On the _i_-th step Greg removes vertex number _x__i_ from the gr... | 1,700 | false | false | false | true | false | false | false | false | false | true | 8,650 |
1822G2 | This is the hard version of the problem. The only difference is that in this version, $$$a_i le 10^9$$$. For a given sequence of $$$n$$$ integers $$$a$$$, a triple $$$(i, j, k)$$$ is called magic if: $$$1 le i, j, k le n$$$. $$$i$$$, $$$j$$$, $$$k$$$ are pairwise distinct. there exists a positive integer $$$b$$$ suc... | 2,200 | true | false | false | false | true | false | true | false | false | false | 1,344 |
1155B | A telephone number is a sequence of exactly $$$11$$$ digits such that its first digit is 8. Vasya and Petya are playing a game. Initially they have a string $$$s$$$ of length $$$n$$$ ($$$n$$$ is odd) consisting of digits. Vasya makes the first move, then players alternate turns. In one move the player must choose a cha... | 1,200 | false | true | true | false | false | false | false | false | false | false | 4,935 |
160B | Each of you probably has your personal experience of riding public transportation and buying tickets. After a person buys a ticket (which traditionally has an even number of digits), he usually checks whether the ticket is lucky. Let us remind you that a ticket is lucky if the sum of digits in its first half matches th... | 1,100 | false | true | false | false | false | false | false | false | true | false | 9,234 |
538C | A tourist hiked along the mountain range. The hike lasted for _n_ days, during each day the tourist noted height above the sea level. On the _i_-th day height was equal to some integer _h__i_. The tourist pick smooth enough route for his hike, meaning that the between any two consecutive days height changes by at most ... | 1,600 | true | true | true | false | false | false | true | true | false | false | 7,686 |
73B | Vasya plays the Need For Brake. He plays because he was presented with a new computer wheel for birthday! Now he is sure that he will win the first place in the championship in his favourite racing computer game! _n_ racers take part in the championship, which consists of a number of races. After each race racers are a... | 2,000 | false | true | false | false | false | false | false | true | true | false | 9,601 |
1995E1 | This is the easy version of a problem. The only difference between an easy and a hard version is the constraints on $$$t$$$ and $$$n$$$. You can make hacks only if both versions of the problem are solved. Arthur is giving a lesson to his famous $$$2 n$$$ knights. Like any other students, they're sitting at the desks in... | 2,700 | false | false | false | true | true | false | false | false | false | false | 292 |
1038F | You are given a binary string $$$s$$$. Find the number of distinct cyclical binary strings of length $$$n$$$ which contain $$$s$$$ as a substring. The cyclical string $$$t$$$ contains $$$s$$$ as a substring if there is some cyclical shift of string $$$t$$$, such that $$$s$$$ is a substring of this cyclical shift of $$$... | 2,900 | false | false | false | true | false | false | false | false | false | false | 5,503 |
1680A | An array is beautiful if both of the following two conditions meet: there are at least $$$l_1$$$ and at most $$$r_1$$$ elements in the array equal to its minimum; there are at least $$$l_2$$$ and at most $$$r_2$$$ elements in the array equal to its maximum. For example, the array $$$[2, 3, 2, 4, 4, 3, 2]$$$ has $$$3$... | 800 | true | false | false | false | false | false | true | false | false | false | 2,191 |
1826F | This is an interactive problem. There are $$$n$$$ distinct hidden points with real coordinates on a two-dimensional Euclidean plane. In one query, you can ask some line $$$ax + by + c = 0$$$ and get the projections of all $$$n$$$ points to this line in some order. The given projections are not exact, please read the in... | 2,800 | true | false | false | false | false | false | false | false | false | false | 1,324 |
1619F | The Hat is a game of speedy explanation/guessing words (similar to Alias). It's fun. Try it! In this problem, we are talking about a variant of the game when the players are sitting at the table and everyone plays individually (i.e. not teams, but individual gamers play). $$$n$$$ people gathered in a room with $$$m$$$ ... | 2,000 | true | true | false | false | false | true | true | false | false | false | 2,530 |
1945G | Finally, lunchtime! $$$n$$$ schoolchildren have lined up in a long queue at the cook's tent for porridge. The cook will be serving porridge for $$$D$$$ minutes. The schoolchild standing in the $$$i$$$-th position in the queue has a priority of $$$k_i$$$ and eats one portion of porridge in $$$s_i$$$ minutes. At the begi... | 2,500 | false | false | true | false | true | true | false | true | false | false | 607 |
1792A | Monocarp is playing a computer game. He's going to kill $$$n$$$ monsters, the $$$i$$$-th of them has $$$h_i$$$ health. Monocarp's character has two spells, either of which he can cast an arbitrary number of times (possibly, zero) and in an arbitrary order: choose exactly two alive monsters and decrease their health by... | 800 | false | true | false | false | false | false | false | false | true | false | 1,527 |
1304F1 | The only difference between easy and hard versions is the constraint on $$$k$$$. Gildong loves observing animals, so he bought two cameras to take videos of wild animals in a forest. The color of one camera is red, and the other one's color is blue. Gildong is going to take videos for $$$n$$$ days, starting from day $$... | 2,300 | false | false | false | true | true | false | false | false | false | false | 4,166 |
1038A | You are given a string $$$s$$$ of length $$$n$$$, which consists only of the first $$$k$$$ letters of the Latin alphabet. All letters in string $$$s$$$ are uppercase. A subsequence of string $$$s$$$ is a string that can be derived from $$$s$$$ by deleting some of its symbols without changing the order of the remaining ... | 800 | false | false | true | false | false | false | false | false | false | false | 5,508 |
1826D | There is a street with $$$n$$$ sights, with sight number $$$i$$$ being $$$i$$$ miles from the beginning of the street. Sight number $$$i$$$ has beauty $$$b_i$$$. You want to start your morning jog $$$l$$$ miles and end it $$$r$$$ miles from the beginning of the street. By the time you run, you will see sights you run b... | 1,700 | false | true | false | true | false | false | true | false | false | false | 1,326 |
420B | Nearly each project of the F company has a whole team of developers working on it. They often are in different rooms of the office in different cities and even countries. To keep in touch and track the results of the project, the F company conducts shared online meetings in a Spyke chat. One day the director of the F c... | 1,800 | false | false | true | false | false | false | false | false | false | false | 8,149 |
1133F1 | You are given an undirected unweighted connected graph consisting of $$$n$$$ vertices and $$$m$$$ edges. It is guaranteed that there are no self-loops or multiple edges in the given graph. Your task is to find any spanning tree of this graph such that the maximum degree over all vertices is maximum possible. Recall tha... | 1,600 | false | false | false | false | false | false | false | false | false | true | 5,049 |
1385A | You are given three positive (i.e. strictly greater than zero) integers $$$x$$$, $$$y$$$ and $$$z$$$. Your task is to find positive integers $$$a$$$, $$$b$$$ and $$$c$$$ such that $$$x = max(a, b)$$$, $$$y = max(a, c)$$$ and $$$z = max(b, c)$$$, or determine that it is impossible to find such $$$a$$$, $$$b$$$ and $$$c$... | 800 | true | false | false | false | false | false | false | false | false | false | 3,747 |
675A | Vasya likes everything infinite. Now he is studying the properties of a sequence _s_, such that its first element is equal to _a_ (_s_1u2009=u2009_a_), and the difference between any two neighbouring elements is equal to _c_ (_s__i_u2009-u2009_s__i_u2009-u20091u2009=u2009_c_). In particular, Vasya wonders if his favour... | 1,100 | true | false | false | false | false | false | false | false | false | false | 7,131 |
1598A | Monocarp is playing a computer game. Now he wants to complete the first level of this game. A level is a rectangular grid of $$$2$$$ rows and $$$n$$$ columns. Monocarp controls a character, which starts in cell $$$(1, 1)$$$xa0β at the intersection of the $$$1$$$-st row and the $$$1$$$-st column. Monocarp's character ca... | 800 | false | false | true | true | false | false | true | false | false | false | 2,671 |
949B | Dima is a beginner programmer. During his working process, he regularly has to repeat the following operation again and again: to remove every second element from the array. One day he has been bored with easy solutions of this problem, and he has come up with the following extravagant algorithm. Let's consider that in... | 1,700 | true | false | false | false | false | true | false | false | false | false | 5,923 |
1866G | Pak Chanek observes that the carriages of a train is always full on morning departure hours and afternoon departure hours. Therefore, the balance between carriages is needed so that it is not too crowded in only a few carriages. A train contains $$$N$$$ carriages that are numbered from $$$1$$$ to $$$N$$$ from left to r... | 2,100 | false | true | false | true | true | false | false | true | false | false | 1,082 |
1108E1 | The only difference between easy and hard versions is a number of elements in the array. You are given an array $$$a$$$ consisting of $$$n$$$ integers. The value of the $$$i$$$-th element of the array is $$$a_i$$$. You are also given a set of $$$m$$$ segments. The $$$j$$$-th segment is $$$[l_j; r_j]$$$, where $$$1 le l... | 1,800 | false | true | true | false | false | false | true | false | false | false | 5,158 |
687D | Long time ago, there was a great kingdom and it was being ruled by The Great Arya and Pari The Great. These two had some problems about the numbers they like, so they decided to divide the great kingdom between themselves. The great kingdom consisted of _n_ cities numbered from 1 to _n_ and _m_ bidirectional roads betw... | 2,500 | false | false | false | false | true | false | true | false | true | true | 7,073 |
552D | Problem - 552D - 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,900 | true | false | false | false | true | false | true | false | true | false | 7,624 |
1163F | In the city of Capypaland where Kuro and Shiro resides, there are $$$n$$$ towns numbered from $$$1$$$ to $$$n$$$ and there are $$$m$$$ bidirectional roads numbered from $$$1$$$ to $$$m$$$ connecting them. The $$$i$$$-th road connects towns $$$u_i$$$ and $$$v_i$$$. Since traveling between the towns is quite difficult, t... | 3,000 | false | false | false | false | true | false | false | false | false | true | 4,897 |
412A | 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 office, and the first thing to do is to write the company's slogan above the main entrance to the building. The slogan of the company consists of _n_ characters, so the decorators hung a la... | 900 | false | true | true | false | false | false | false | false | false | false | 8,179 |
78B | Problem - 78B - 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 - so... | 1,200 | false | false | true | false | false | true | false | false | false | false | 9,574 |
44D | In a far away galaxy there are _n_ inhabited planets, numbered with numbers from 1 to _n_. They are located at large distances from each other, that's why the communication between them was very difficult until on the planet number 1 a hyperdrive was invented. As soon as this significant event took place, _n_u2009-u200... | 1,800 | true | false | false | false | false | false | false | false | false | false | 9,766 |
1183D | This problem is actually a subproblem of problem G from the same contest. There are $$$n$$$ candies in a candy box. The type of the $$$i$$$-th candy is $$$a_i$$$ ($$$1 le a_i le n$$$). You have to prepare a gift using some of these candies with the following restriction: the numbers of candies of each type presented in... | 1,400 | false | true | false | false | false | false | false | false | true | false | 4,799 |
1684C | You are given a grid with $$$n$$$ rows and $$$m$$$ columns, where each cell has a positive integer written on it. Let's call a grid good, if in each row the sequence of numbers is sorted in a non-decreasing order. It means, that for each $$$1 le i le n$$$ and $$$2 le j le m$$$ the following holds: $$$a_{i,j} ge a_{i, j... | 1,400 | false | true | true | false | false | true | true | false | true | false | 2,171 |
978B | You can not just take the file and send it. When Polycarp trying to send a file in the social network "Codehorses", he encountered an unexpected problem. If the name of the file contains three or more "x" (lowercase Latin letters "x") in a row, the system considers that the file content does not correspond to the socia... | 800 | false | true | false | false | false | false | false | false | false | false | 5,817 |
27E | . Output Output the smallest positive integer with exactly _n_ divisors. | 2,000 | false | false | false | true | false | false | true | false | false | false | 9,859 |
1748F | You have an array $$$a_0, a_1, ldots, a_{n-1}$$$ of length $$$n$$$. Initially, $$$a_i = 2^i$$$ for all $$$0 le i lt n$$$. Note that array $$$a$$$ is zero-indexed. You want to reverse this array (that is, make $$$a_i$$$ equal to $$$2^{n-1-i}$$$ for all $$$0 le i lt n$$$). To do this, you can perform the following operat... | 3,000 | false | false | false | false | false | true | false | false | false | false | 1,792 |
1472G | There are $$$n$$$ cities in Berland. The city numbered $$$1$$$ is the capital. Some pairs of cities are connected by a one-way road of length 1. Before the trip, Polycarp for each city found out the value of $$$d_i$$$xa0β the shortest distance from the capital (the $$$1$$$-st city) to the $$$i$$$-th city. Polycarp begi... | 2,100 | false | false | false | true | false | false | false | false | false | true | 3,318 |
100B | Problem - 100B - Codeforces =============== xa0 , where _n_ β the number of integers in the group. The next line contains the elements, sorted in the non-decreasing order. The numbers are comma separated, they have at most 7 digits in their decimal notation and do not have any leading zeros. Output If the gro... | 1,500 | false | false | true | false | false | false | false | false | false | false | 9,488 |
980A | Problem - 980A - 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... | 900 | true | false | true | false | false | false | false | false | false | false | 5,806 |
1698D | Enter Register HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP RAYAN Codeforces Round 803 (Div. 2) 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... | 1,600 | false | false | false | false | false | true | false | true | false | false | 2,091 |
1993D | Given two positive integers $$$n$$$ and $$$k$$$, and another array $$$a$$$ of $$$n$$$ integers. In one operation, you can select any subarray of size $$$k$$$ of $$$a$$$, then remove it from the array without changing the order of other elements. More formally, let $$$(l, r)$$$ be an operation on subarray $$$a_l, a_{l+1... | 2,200 | false | true | false | true | false | false | false | true | false | false | 309 |
1774B | Cirno_9baka has a paper tape with $$$n$$$ cells in a row on it. As he thinks that the blank paper tape is too dull, he wants to paint these cells with $$$m$$$ kinds of colors. For some aesthetic reasons, he thinks that the $$$i$$$-th color must be used exactly $$$a_i$$$ times, and for every $$$k$$$ consecutive cells, t... | 1,500 | true | true | false | false | false | true | false | false | false | false | 1,643 |
1693D | Let's call an array $$$a$$$ of $$$m$$$ integers $$$a_1, a_2, ldots, a_m$$$ Decinc if $$$a$$$ can be made increasing by removing a decreasing subsequence (possibly empty) from it. For example, if $$$a = [3, 2, 4, 1, 5]$$$, we can remove the decreasing subsequence $$$[a_1, a_4]$$$ from $$$a$$$ and obtain $$$a = [2, 4, 5... | 2,800 | false | true | false | true | true | false | true | false | false | false | 2,119 |
1942H | Ruby just won an internship position at Farmer John's farm by winning a coding competition! As the newly recruited intern, Ruby is tasked with maintaining Farmer John's peach tree, a tree consisting of $$$n$$$ nodes rooted at node $$$1$$$. Each node initially contains $$$a_i = 0$$$ peaches, and there are two types of e... | 3,500 | false | false | false | true | true | false | false | false | false | false | 624 |
1426B | Masha has $$$n$$$ types of tiles of size $$$2 imes 2$$$. Each cell of the tile contains one integer. Masha has an infinite number of tiles of each type. Masha decides to construct the square of size $$$m imes m$$$ consisting of the given tiles. This square also has to be a symmetric with respect to the main diagonal ... | 900 | false | false | true | false | false | false | false | false | false | false | 3,538 |
1616F | You are given a simple undirected graph with $$$n$$$ vertices and $$$m$$$ edges. Edge $$$i$$$ is colored in the color $$$c_i$$$, which is either $$$1$$$, $$$2$$$, or $$$3$$$, or left uncolored (in this case, $$$c_i = -1$$$). You need to color all of the uncolored edges in such a way that for any three pairwise adjacent... | 2,900 | true | false | false | false | false | false | true | false | false | true | 2,551 |
1672I | You have a permutation $$$p$$$ of integers from $$$1$$$ to $$$n$$$. You have a strength of $$$s$$$ and will perform the following operation some times: Choose an index $$$i$$$ such that $$$1 leq i leq p$$$ and $$$i-p_i leq s$$$. For all $$$j$$$ such that $$$1 leq j leq p$$$ and $$$p_i<p_j$$$, update $$$p_j$$$ to $$$p... | 3,000 | false | true | false | false | true | false | false | false | false | false | 2,236 |
1282D | This is an interactive problem. After completing the last level of the enchanted temple, you received a powerful artifact of the 255th level. Do not rush to celebrate, because this artifact has a powerful rune that can be destroyed with a single spell $$$s$$$, which you are going to find. We define the spell as some no... | 2,300 | false | false | false | false | false | true | false | false | false | false | 4,282 |
1770E | Imi has an undirected tree with $$$n$$$ vertices where edges are numbered from $$$1$$$ to $$$n-1$$$. The $$$i$$$-th edge connects vertices $$$u_i$$$ and $$$v_i$$$. There are also $$$k$$$ butterflies on the tree. Initially, the $$$i$$$-th butterfly is on vertex $$$a_i$$$. All values of $$$a$$$ are pairwise distinct. Kox... | 2,400 | true | false | false | true | false | false | false | false | false | false | 1,673 |
1342F | You are given an array $$$a$$$ consisting of $$$n$$$ elements. You may apply several operations (possibly zero) to it. During each operation, you choose two indices $$$i$$$ and $$$j$$$ ($$$1 le i, j le n$$$; $$$i e j$$$), increase $$$a_j$$$ by $$$a_i$$$, and remove the $$$i$$$-th element from the array (so the indices... | 3,000 | false | false | false | true | false | false | true | false | false | false | 3,994 |
1389A | Problem - 1389A - 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 | true | false | false | false | true | false | false | false | false | 3,728 |
172B | Polycarpus has recently got interested in sequences of pseudorandom numbers. He learned that many programming languages generate such sequences in a similar way: (for _i_u2009β₯u20091). Here _a_, _b_, _m_ are constants, fixed for the given realization of the pseudorandom numbers generator, _r_0 is the so-called _randsee... | 1,200 | false | false | true | false | false | false | false | false | false | false | 9,177 |
1551E | Consider a sequence of integers $$$a_1, a_2, ldots, a_n$$$. In one move, you can select any element of the sequence and delete it. After an element is deleted, all elements to the right are shifted to the left by $$$1$$$ position, so there are no empty spaces in the sequence. So after you make a move, the sequence's le... | 2,000 | false | false | false | true | false | false | true | true | false | false | 2,886 |
1168B | Problem - 1168B - 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,900 | false | false | false | false | false | false | true | false | false | false | 4,875 |
633C | After observing the results of Spy Syndrome, Yash realised the errors of his ways. He now believes that a super spy such as Siddhant can't use a cipher as basic and ancient as Caesar cipher. After many weeks of observation of Siddhantβs sentences, Yash determined a new cipher technique. For a given sentence, the cipher... | 1,900 | false | false | true | true | true | false | false | false | true | false | 7,273 |
1025C | Is there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spending the entire weekend accompanied by pretty striped zebras. Inspired by this adventure and an accidentally found plasticine pack (represented as a sequence of black and white stripes), Grisha now wa... | 1,600 | false | false | true | false | false | true | false | false | false | false | 5,581 |
1534H | This is an interactive problem. As he qualified for IOI this year, Little Ericyi was given a gift from all his friends: a tree of $$$n$$$ nodes! On the flight to IOI Little Ericyi was very bored, so he decided to play a game with Little Yvonne with his new tree. First, Little Yvonne selects two (not necessarily differe... | 3,500 | false | false | false | true | false | true | false | false | true | true | 2,975 |
93C | After the Search Ultimate program that searched for strings in a text failed, Igor K. got to think: "Why on Earth does my program work so slowly?" As he double-checked his code, he said: "My code contains no errors, yet I know how we will improve Search Ultimate!" and took a large book from the shelves. The book read "... | 2,500 | false | false | true | false | false | false | true | false | false | false | 9,513 |
1949A | You want to plant trees in a square lawn of size $$$n imes n$$$ whose corners have Cartesian coordinates $$$(0, 0)$$$, $$$(n, 0)$$$, $$$(0, n)$$$, and $$$(n, n)$$$. Trees can only be planted at locations with integer coordinates. Every tree will grow roots within a disk of radius $$$r$$$ centered at the location where... | 3,300 | false | false | false | true | false | false | true | false | false | false | 592 |
746G | There are _n_ cities in Berland, each of them has a unique idxa0β an integer from 1 to _n_, the capital is the one with id 1. Now there is a serious problem in Berland with roadsxa0β there are no roads. That is why there was a decision to build _n_u2009-u20091 roads so that there will be exactly one simple path between... | 2,100 | false | false | false | false | false | true | false | false | false | true | 6,811 |
269D | 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 affixed to a wide flat wall. The water flows down the top of the wall from panel to panel until it reaches the bottom of the wall. The wall ... | 2,600 | false | false | false | true | true | false | false | false | true | true | 8,755 |
1103E | Let's define radix sum of number $$$a$$$ consisting of digits $$$a_1, ldots ,a_k$$$ and number $$$b$$$ consisting of digits $$$b_1, ldots ,b_k$$$(we add leading zeroes to the shorter number to match longer length) as number $$$s(a,b)$$$ consisting of digits $$$(a_1+b_1)mod 10, ldots ,(a_k+b_k)mod 10$$$. The radix sum o... | 3,400 | true | false | false | false | false | false | false | false | false | false | 5,183 |
1607D | You are given an array of integers $$$a$$$ of length $$$n$$$. The elements of the array can be either different or the same. Each element of the array is colored either blue or red. There are no unpainted elements in the array. One of the two operations described below can be applied to an array in a single step: eith... | 1,300 | true | true | false | false | false | false | false | false | true | false | 2,620 |
1343C | Recall that the sequence $$$b$$$ is a a subsequence of the sequence $$$a$$$ if $$$b$$$ can be derived from $$$a$$$ by removing zero or more elements without changing the order of the remaining elements. For example, if $$$a=[1, 2, 1, 3, 1, 2, 1]$$$, then possible subsequences are: $$$[1, 1, 1, 1]$$$, $$$[3]$$$ and $$$[... | 1,200 | false | true | false | true | false | false | false | false | false | false | 3,991 |
1213D2 | Problem - 1213D2 - 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,600 | true | false | false | false | false | false | true | false | true | false | 4,615 |
219E | A parking lot in the City consists of _n_ parking spaces, standing in a line. The parking spaces are numbered from 1 to _n_ from left to right. When a car arrives at the lot, the operator determines an empty parking space for it. For the safety's sake the chosen place should be located as far from the already occupied ... | 2,200 | false | false | false | false | true | false | false | false | false | false | 8,960 |
990D | Given three numbers $$$n, a, b$$$. You need to find an adjacency matrix of such an undirected graph that the number of components in it is equal to $$$a$$$, and the number of components in its complement is $$$b$$$. The matrix must be symmetric, and all digits on the main diagonal must be zeroes. In an undirected graph... | 1,700 | false | false | true | false | false | true | false | false | false | true | 5,749 |
1743F | You are given $$$n$$$ segments on the coordinate axis. The $$$i$$$-th segment is $$$[l_i, r_i]$$$. Let's denote the set of all integer points belonging to the $$$i$$$-th segment as $$$S_i$$$. Let $$$A cup B$$$ be the union of two sets $$$A$$$ and $$$B$$$, $$$A cap B$$$ be the intersection of two sets $$$A$$$ and $$$B$$... | 2,300 | false | false | false | true | true | false | false | false | false | false | 1,819 |
1575B | Mr. Chanek lives in a city represented as a plane. He wants to build an amusement park in the shape of a circle of radius $$$r$$$. The circle must touch the origin (point $$$(0, 0)$$$). There are $$$n$$$ bird habitats that can be a photo spot for the tourists in the park. The $$$i$$$-th bird habitat is at point $$$p_i ... | 2,300 | false | false | false | false | false | false | false | true | false | false | 2,767 |
1984E | Two hungry red pandas, Oscar and Lura, have a tree $$$T$$$ with $$$n$$$ nodes. They are willing to perform the following shuffle procedure on the whole tree $$$T$$$ exactly once. With this shuffle procedure, they will create a new tree out of the nodes of the old tree. 1. Choose any node $$$V$$$ from the original tree ... | 2,400 | false | true | false | true | false | false | false | false | false | false | 378 |
576A | Vasya and Petya are playing a simple game. Vasya thought of number _x_ between 1 and _n_, and Petya tries to guess the number. Petya can ask questions like: "Is the unknown number divisible by number _y_?". The game is played by the following rules: first Petya asks all the questions that interest him (also, he can ask... | 1,500 | true | false | false | false | false | false | false | false | false | false | 7,543 |
1746D | You are given a rooted tree consisting of $$$n$$$ vertices. The vertices are numbered from $$$1$$$ to $$$n$$$, and the root is the vertex $$$1$$$. You are also given a score array $$$s_1, s_2, ldots, s_n$$$. A multiset of $$$k$$$ simple paths is called valid if the following two conditions are both true. Each path sta... | 1,900 | false | true | false | true | false | false | false | false | true | false | 1,807 |
567E | Berland has _n_ cities, the capital is located in city _s_, and the historic home town of the President is in city _t_ (_s_u2009β u2009_t_). The cities are connected by one-way roads, the travel time for each of the road is a positive integer. Once a year the President visited his historic home town _t_, for which his m... | 2,200 | false | false | false | false | false | false | false | false | false | true | 7,580 |
628C | Problem - 628C - Codeforces =============== xa0 . The second line contains a string _s_ of length _n_, consisting of lowercase English letters. Output If there is no string satisfying the given conditions then print "-1" (without the quotes). Otherwise, print any nice string _s_' that . Examples Input 4 2... | 1,300 | false | true | false | false | false | false | false | false | false | false | 7,313 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.