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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1340E | Unfortunately, a mistake was found in the proof of the author's solution to this problem. Currently, we don't know the absolutely correct solution. However, you can solve this task, but if your solution passes all the tests, it is not guaranteed to be correct. If your solution has passed all the tests and you are sure ... | 3,000 | false | false | false | false | false | false | false | false | false | true | 4,003 |
516D | Drazil and Varda are the earthworm couple. They want to find a good place to bring up their children. They found a good ground containing nature hole. The hole contains many rooms, some pairs of rooms are connected by small tunnels such that earthworm can move between them. Let's consider rooms and small tunnels as the... | 2,800 | false | false | false | true | false | false | false | false | false | false | 7,770 |
148E | During her tantrums the princess usually smashes some collectable porcelain. Every furious shriek is accompanied with one item smashed. The collection of porcelain is arranged neatly on _n_ shelves. Within each shelf the items are placed in one row, so that one can access only the outermost items — the leftmost or the ... | 1,900 | false | false | false | true | false | false | false | false | false | false | 9,282 |
810B | Summer holidays! Someone is going on trips, someone is visiting grandparents, but someone is trying to get a part-time job. This summer Noora decided that she wants to earn some money, and took a job in a shop as an assistant. Shop, where Noora is working, has a plan on the following _n_ days. For each day sales manage... | 1,300 | false | true | false | false | false | false | false | false | true | false | 6,522 |
1452D | There are $$$n + 2$$$ towns located on a coordinate line, numbered from $$$0$$$ to $$$n + 1$$$. The $$$i$$$-th town is located at the point $$$i$$$. You build a radio tower in each of the towns $$$1, 2, dots, n$$$ with probability $$$frac{1}{2}$$$ (these events are independent). After that, you want to set the signal p... | 1,600 | true | false | false | true | false | false | false | false | false | false | 3,418 |
2028C | Alice is at the Mad Hatter's tea party! There is a long sheet cake made up of $$$n$$$ sections with tastiness values $$$a_1, a_2, ldots, a_n$$$. There are $$$m$$$ creatures at the tea party, excluding Alice. Alice will cut the cake into $$$m + 1$$$ pieces. Formally, she will partition the cake into $$$m + 1$$$ subarray... | 1,600 | false | true | false | true | false | false | false | true | false | false | 101 |
750A | Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exactly until midnight. There will be _n_ problems, sorted by difficulty, i.e. problem 1 is the easiest and problem _n_ is the hardest. Limak knows it will take him 5·_i_ minutes to solve th... | 800 | true | false | true | false | false | false | true | true | false | false | 6,793 |
1016E | There is a light source on the plane. This source is so small that it can be represented as point. The light source is moving from point $$$(a, s_y)$$$ to the $$$(b, s_y)$$$ $$$(s_y < 0)$$$ with speed equal to $$$1$$$ unit per second. The trajectory of this light source is a straight segment connecting these two points... | 2,400 | false | false | false | false | false | false | false | true | false | false | 5,608 |
1775B | The gardener Kazimir Kazimirovich has an array of $$$n$$$ integers $$$c_1, c_2, dots, c_n$$$. He wants to check if there are two different subsequences $$$a$$$ and $$$b$$$ of the original array, for which $$$f(a) = f(b)$$$, where $$$f(x)$$$ is the elements. Two subsequences are considered different if the sets of index... | 1,300 | false | false | false | false | false | true | false | false | false | false | 1,633 |
1371E1 | # Asterism (Easy Version) Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 256 megabytes This is the easy version of the problem. The difference between versions is the constraints on n and ai. You can make hacks only if all versions of the problem are solved. First, Aoi c... | 1,900 | true | false | false | false | false | false | true | true | true | false | 3,810 |
799B | 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 of the _i_-th t-shirt and _b__i_ is back color of the _i_-th t-shirt. All values _p__i_ are distinct, and values _a__i_ and... | 1,400 | false | false | true | false | true | false | false | false | false | false | 6,575 |
1361F | # Johnny and New Toy Input file: standard input Output file: standard output Time limit: 15 seconds Memory limit: 1024 megabytes Johnny has a new toy. As you may guess, it is a little bit extraordinary. The toy is a permutation P of numbers from 1 to n, written in one row next to each other. For each i from 1 to n −... | 3,300 | true | false | true | false | true | false | false | false | false | false | 3,872 |
289B | Problem - 289B - 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,400 | false | false | true | true | false | false | true | false | true | false | 8,678 |
771A | Bear Limak examines a social network. Its main functionality is that two members can become friends (then they can talk with each other and share funny pictures). There are _n_ members, numbered 1 through _n_. _m_ pairs of members are friends. Of course, a member can't be a friend with themselves. Let A-B denote that m... | 1,500 | false | false | false | false | false | false | false | false | false | true | 6,698 |
1777C | A school has to decide on its team for an international quiz. There are $$$n$$$ students in the school. We can describe the students using an array $$$a$$$ where $$$a_i$$$ is the smartness of the $$$i$$$-th ($$$1 le i le n$$$) student. There are $$$m$$$ topics $$$1, 2, 3, ldots, m$$$ from which the quiz questions will ... | 1,700 | true | false | false | false | false | false | false | true | true | false | 1,612 |
1043D | Acingel is a small town. There was only one doctor herexa0— Miss Ada. She was very friendly and nobody has ever said something bad about her, so who could've expected that Ada will be found dead in her house? Mr Gawry, world-famous detective, is appointed to find the criminal. He asked $$$m$$$ neighbours of Ada about c... | 1,700 | true | false | false | false | false | false | true | false | false | false | 5,480 |
138C | One day Natalia was walking in the woods when she met a little mushroom gnome. The gnome told her the following story: Everybody knows that the mushroom gnomes' power lies in the magic mushrooms that grow in the native woods of the gnomes. There are _n_ trees and _m_ magic mushrooms in the woods: the _i_-th tree grows ... | 2,200 | false | false | false | false | true | false | false | true | true | false | 9,323 |
1147A | Alice and Bob are playing a game on a line with $$$n$$$ cells. There are $$$n$$$ cells labeled from $$$1$$$ through $$$n$$$. For each $$$i$$$ from $$$1$$$ to $$$n-1$$$, cells $$$i$$$ and $$$i+1$$$ are adjacent. Alice initially has a token on some cell on the line, and Bob tries to guess where it is. Bob guesses a seque... | 1,500 | false | false | false | false | false | false | false | false | false | true | 4,983 |
1215C | Monocarp has got two strings $$$s$$$ and $$$t$$$ having equal length. Both strings consist of lowercase Latin letters "a" and "b". Monocarp wants to make these two strings $$$s$$$ and $$$t$$$ equal to each other. He can do the following operation any number of times: choose an index $$$pos_1$$$ in the string $$$s$$$, c... | 1,500 | false | true | false | false | false | true | false | false | false | false | 4,601 |
1358E | Levian works as an accountant in a large company. Levian knows how much the company has earned in each of the $$$n$$$ consecutive months — in the $$$i$$$-th month the company had income equal to $$$a_i$$$ (positive income means profit, negative income means loss, zero income means no change). Because of the general sel... | 2,400 | false | true | true | false | true | true | false | false | false | false | 3,893 |
858A | Problem - 858A - Codeforces =============== xa0 ]( "54580") Editorial") . Output Print the _k_-rounding of _n_. Examples Input 375 4 Output 30000 Input 10000 1 Output 10000 Input 38101 0 Output 38101 Input 123456789 8 Output 12345678900000000 | 1,100 | true | false | false | false | false | false | true | false | false | false | 6,314 |
1679A | Spring has come, and the management of the AvtoBus bus fleet has given the order to replace winter tires with summer tires on all buses. You own a small bus service business and you have just received an order to replace $$$n$$$ tires. You know that the bus fleet owns two types of buses: with two axles (these buses hav... | 900 | true | true | false | false | false | false | true | false | false | false | 2,197 |
1945F | As soon as everyone in the camp fell asleep, Kirill sneaked out of the tent and went to the Wise Oak to gather mushrooms. It is known that there are $$$n$$$ mushrooms growing under the Oak, each of which has magic power $$$v_i$$$. Kirill really wants to make a magical elixir of maximum strength from the mushrooms. The ... | 1,900 | false | false | false | false | true | false | false | false | true | false | 608 |
86D | An array of positive integers _a_1,u2009_a_2,u2009...,u2009_a__n_ is given. Let us consider its arbitrary subarray _a__l_,u2009_a__l_u2009+u20091...,u2009_a__r_, where 1u2009≤u2009_l_u2009≤u2009_r_u2009≤u2009_n_. For every positive integer _s_ denote by _K__s_ the number of occurrences of _s_ into the subarray. We call... | 2,200 | true | false | true | false | true | false | false | false | false | false | 9,538 |
400B | Inna likes sweets and a game called the "Candy Matrix". Today, she came up with the new game "Candy Matrix 2: Reload". The field for the new game is a rectangle table of size _n_u2009×u2009_m_. Each line of the table contains one cell with a dwarf figurine, one cell with a candy, the other cells of the line are empty. ... | 1,200 | false | false | true | false | false | false | true | false | false | false | 8,226 |
212A | There is a developed network of flights between Berland and Beerland. All of them belong to the Berland state company BerAvia. Each flight connects some Berland city with some Beerland city. For each flight airplanes fly in both directions. Changes are coming to Berland — the state decided to privatize BerAvia, namely,... | 3,000 | false | false | false | false | false | false | false | false | false | true | 8,993 |
1482E | Alice is visiting New York City. To make the trip fun, Alice will take photos of the city skyline and give the set of photos as a present to Bob. However, she wants to find the set of photos with maximum beauty and she needs your help. There are $$$n$$$ buildings in the city, the $$$i$$$-th of them has positive height ... | 2,100 | false | false | false | true | true | false | false | false | false | false | 3,263 |
113B | Problem - 113B - 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... | 2,000 | false | false | false | false | true | false | true | false | false | false | 9,434 |
493A | Vasya has started watching football games. He has learned that for some fouls the players receive yellow cards, and for some fouls they receive red cards. A player who receives the second yellow card automatically receives a red card. Vasya is watching a recorded football match now and makes notes of all the fouls that... | 1,300 | false | false | true | false | false | false | false | false | false | false | 7,863 |
585E | Vitalik the philatelist has a birthday today! As he is a regular customer in a stamp store called 'Robin Bobin', the store management decided to make him a gift. Vitalik wants to buy one stamp and the store will give him a non-empty set of the remaining stamps, such that the greatest common divisor (GCD) of the price o... | 2,900 | true | false | false | false | false | false | false | false | false | false | 7,501 |
706D | Author has gone out of the stories about Vasiliy, so here is just a formal task description. You are given _q_ queries and a multiset _A_, initially containing only integer 0. There are three types of queries: 1. "+ x"xa0— add integer _x_ to multiset _A_. 2. "- x"xa0— erase one occurrence of integer _x_ from multiset _... | 1,800 | false | false | false | false | true | false | false | true | false | false | 6,996 |
635A | Paul is at the orchestra. The string section is arranged in an _r_u2009×u2009_c_ rectangular grid and is filled with violinists with the exception of _n_ violists. Paul really likes violas, so he would like to take a picture including at least _k_ of them. Paul can take a picture of any axis-parallel rectangle in the o... | 1,100 | false | false | true | false | false | false | true | false | false | false | 7,266 |
1178F2 | This is the second subtask of problem F. The only differences between this and the first subtask are the constraints on the value of $$$m$$$ and the time limit. It is sufficient to solve this subtask in order to hack it, but you need to solve both subtasks in order to hack the first one. There are $$$n+1$$$ distinct co... | 2,600 | false | false | false | true | false | false | false | false | false | false | 4,824 |
1070M | Once upon a time Algoland and Berland were a single country, but those times are long gone. Now they are two different countries, but their cities are scattered on a common territory. All cities are represented as points on the Cartesian plane. Algoland consists of $$$a$$$ cities numbered from $$$1$$$ to $$$a$$$. The c... | 3,000 | false | false | false | false | false | true | false | false | false | false | 5,355 |
815C | On the way home, Karen decided to stop by the supermarket to buy some groceries. She needs to buy a lot of goods, but since she is a student her budget is still quite limited. In fact, she can only spend up to _b_ dollars. The supermarket sells _n_ goods. The _i_-th good can be bought for _c__i_ dollars. Of course, eac... | 2,400 | false | false | false | true | false | false | true | false | false | false | 6,498 |
1983E | Alice and Bob are playing a game. There are $$$n$$$ balls, out of which $$$k$$$ are special. Each ball has a value associated with it. The players play turn by turn. In each turn, the player randomly picks a ball and adds the value of the ball to their score, which is $$$0$$$ at the beginning of the game. The selected ... | 2,300 | true | false | false | false | false | false | false | false | false | false | 386 |
1705D | Mark has just purchased a rack of $$$n$$$ lightbulbs. The state of the lightbulbs can be described with binary string $$$s = s_1s_2dots s_n$$$, where $$$s_i= exttt{1}$$$ means that the $$$i$$$-th lightbulb is turned on, while $$$s_i= exttt{0}$$$ means that the $$$i$$$-th lightbulb is turned off. Unfortunately, the ligh... | 1,800 | true | true | false | false | false | true | false | false | true | false | 2,043 |
542A | 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 special way: the colors and the soundtrack are adjusted to the time of the day and the viewers' mood. That's why the _i_-th video can only be shown within the time ra... | 2,400 | false | false | false | false | true | false | false | false | true | false | 7,675 |
1738F | This is an interactive problem. Given a simple undirected graph with $$$n$$$ vertices numbered from $$$1$$$ to $$$n$$$, your task is to color all the vertices such that for every color $$$c$$$, the following conditions hold: 1. The set of vertices with color $$$c$$$ is connected; 2. $$$s_c leq n_c^2$$$, where $$$n_c$$$... | 2,400 | false | true | false | false | false | true | false | false | false | true | 1,856 |
1358D | You've been in love with Coronavirus-chan for a long time, but you didn't know where she lived until now. And just now you found out that she lives in a faraway place called Naha. You immediately decided to take a vacation and visit Coronavirus-chan. Your vacation lasts exactly $$$x$$$ days and that's the exact number ... | 1,900 | false | true | true | false | false | false | true | true | false | false | 3,894 |
1361B | , # Johnny and Grandmaster Input file: standard input Output file: standard output Time limit: 2 seconds Memory limit: 256 megabytes Johnny has just found the new, great tutorial: “ How to become a grandmaster? ”. The tutorial tells many strange and unexpected for Johnny things, such as you have to be patient or tha... | 1,900 | true | true | true | false | false | false | false | false | true | false | 3,876 |
1010B | This is an interactive problem. Natasha is going to fly to Mars. Finally, Natasha sat in the rocket. She flies, flies... but gets bored. She wishes to arrive to Mars already! So she decides to find something to occupy herself. She couldn't think of anything better to do than to calculate the distance to the red planet.... | 1,800 | false | false | false | false | false | false | false | true | false | false | 5,634 |
1622C | You are given an integer array $$$a_1, a_2, dots, a_n$$$ and integer $$$k$$$. In one step you can either choose some index $$$i$$$ and decrease $$$a_i$$$ by one (make $$$a_i = a_i - 1$$$); or choose two indices $$$i$$$ and $$$j$$$ and set $$$a_i$$$ equal to $$$a_j$$$ (make $$$a_i = a_j$$$). What is the minimum number... | 1,600 | false | true | false | false | false | false | true | true | true | false | 2,509 |
1217D | You are given a directed graph with $$$n$$$ vertices and $$$m$$$ directed edges without self-loops or multiple edges. Let's denote the $$$k$$$-coloring of a digraph as following: you color each edge in one of $$$k$$$ colors. The $$$k$$$-coloring is good if and only if there no cycle formed by edges of same color. Find ... | 2,100 | false | false | false | false | false | true | false | false | false | true | 4,587 |
954D | Little town Nsk consists of _n_ junctions connected by _m_ bidirectional roads. Each road connects two distinct junctions and no two roads connect the same pair of junctions. It is possible to get from any junction to any other junction by these roads. The distance between two junctions is equal to the minimum possible... | 1,600 | false | false | false | false | false | false | false | false | false | true | 5,906 |
1062B | JATC's math teacher always gives the class some interesting math problems so that they don't get bored. Today the problem is as follows. Given an integer $$$n$$$, you can perform the following operations zero or more times: mul $$$x$$$: multiplies $$$n$$$ by $$$x$$$ (where $$$x$$$ is an arbitrary positive integer). s... | 1,500 | true | true | false | false | false | false | false | false | false | false | 5,401 |
762C | Problem - 762C - Codeforces =============== xa0 ]( "Announcement") characters from string _b_ in such a way that it becomes a subsequence of string _a_. It can happen that you will not need to remove any characters at all, or maybe you will have to remove all of the characters from _b_ and make it empty. S... | 2,100 | false | false | false | false | false | false | false | true | false | false | 6,741 |
111C | Little Petya loves training spiders. Petya has a board _n_u2009×u2009_m_ in size. Each cell of the board initially has a spider sitting on it. After one second Petya chooses a certain action for each spider, and all of them humbly perform its commands. There are 5 possible commands: to stay idle or to move from current... | 2,100 | false | false | false | true | false | false | false | false | false | false | 9,440 |
1343D | You are given an array $$$a$$$ consisting of $$$n$$$ integers (it is guaranteed that $$$n$$$ is even, i.e. divisible by $$$2$$$). All $$$a_i$$$ does not exceed some integer $$$k$$$. Your task is to replace the minimum number of elements (replacement is the following operation: choose some index $$$i$$$ from $$$1$$$ to ... | 1,700 | false | true | false | false | true | false | true | false | false | false | 3,990 |
131C | Problem - 131C - 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,400 | true | false | false | false | false | false | false | false | false | false | 9,351 |
591B | The name of one small but proud corporation consists of _n_ lowercase English letters. The Corporation has decided to try rebrandingxa0— an active marketing strategy, that includes a set of measures to change either the brand (both for the company and the goods it produces) or its components: the name, the logo, the sl... | 1,200 | false | false | true | false | false | false | false | false | false | false | 7,483 |
578B | Problem - 578B - Codeforces =============== xa0 ]( "Codeforces Round #320 . The second line contains _n_ integers _a_1,u2009_a_2,u2009...,u2009_a__n_ (0u2009≤u2009_a__i_u2009≤u2009109). Output Output the maximum value of a bitwise OR of sequence elements after performing operations. Examples Input 3 1 2 1 1 ... | 1,700 | false | true | false | false | false | false | true | false | false | false | 7,535 |
912B | Since Grisha behaved well last year, at New Year's Eve he was visited by Ded Moroz who brought an enormous bag of gifts with him! The bag contains _n_ sweet candies from the good ol' bakery, each labeled from 1 to _n_ corresponding to its tastiness. No two candies have the same tastiness. The choice of candies has a di... | 1,300 | false | false | false | false | false | true | false | false | false | false | 6,095 |
1840F | Tema is playing a very interesting computer game. During the next mission, Tema's character found himself on an unfamiliar planet. Unlike Earth, this planet is flat and can be represented as an $$$n imes m$$$ rectangle. Tema's character is located at the point with coordinates $$$(0, 0)$$$. In order to successfully co... | 2,200 | false | false | false | true | false | false | true | false | false | true | 1,248 |
697B | Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the distance between him and the girl to make his shot accurate. Barney asked the bar tender Carl about this distance value, but Carl was so busy talking to the customers so he wrote the distance v... | 1,400 | true | false | true | false | false | false | true | false | false | false | 7,034 |
1794B | You are given an array of $$$n$$$ positive integers $$$a_1, a_2, ldots, a_n$$$. In one operation, you can choose any number of the array and add $$$1$$$ to it. Make at most $$$2n$$$ operations so that the array satisfies the following property: $$$a_{i+1}$$$ is not divisible by $$$a_i$$$, for each $$$i = 1, 2, ldots, n... | 900 | true | true | false | false | false | true | false | false | false | false | 1,513 |
115E | You are a car race organizer and would like to arrange some races in Linear Kingdom. Linear Kingdom has _n_ consecutive roads spanning from left to right. The roads are numbered from 1 to _n_ from left to right, thus the roads follow in the order of their numbers' increasing. There will be several races that may be hel... | 2,400 | false | false | false | true | true | false | false | false | false | false | 9,424 |
138B | Problem - 138B - 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 | false | true | false | false | false | false | false | false | false | false | 9,324 |
677C | While walking down the street Vanya saw a label "Hide&Seek". Because he is a programmer, he used & as a bitwise AND for these two words represented as a integers in base 64 and got new word. Now Vanya thinks of some string _s_ and wants to know the number of pairs of words of length _s_ (length of _s_), such that their... | 1,500 | false | false | true | false | false | false | false | false | false | false | 7,119 |
92B | Problem - 92B - 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,300 | false | true | false | false | false | false | false | false | false | false | 9,516 |
1894B | You are given an array $$$a_1, a_2, ldots, a_n$$$. You need to find an array $$$b_1, b_2, ldots, b_n$$$ consisting of numbers $$$1$$$, $$$2$$$, $$$3$$$ such that exactly two out of the following three conditions are satisfied: 1. There exist indices $$$1 leq i, j leq n$$$ such that $$$a_i = a_j$$$, $$$b_i = 1$$$, $$$b_... | 1,000 | false | false | false | false | false | true | false | false | false | false | 945 |
1634B | Haha, try to solve this, SelectorUnlimited! — antontrygubO_o Your friends Alice and Bob practice fortune telling. Fortune telling is performed as follows. There is a well-known array $$$a$$$ of $$$n$$$ non-negative integers indexed from $$$1$$$ to $$$n$$$. The tellee starts with some non-negative number $$$d$$$ and per... | 1,400 | true | false | false | false | false | false | false | false | false | false | 2,445 |
1566D2 | Enter Register HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP RAYAN Codeforces Global Round 16 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 yo... | 1,600 | false | true | true | false | true | false | false | false | true | false | 2,809 |
774J | Well, the series which Stepan watched for a very long time, ended. In total, the series had _n_ episodes. For each of them, Stepan remembers either that he definitely has watched it, or that he definitely hasn't watched it, or he is unsure, has he watched this episode or not. Stepan's dissatisfaction is the maximum num... | 2,000 | false | false | false | true | false | false | false | false | false | false | 6,672 |
1743C | Monocarp has been collecting rare magazines for quite a while, and now he has decided to sell them. He distributed the magazines between $$$n$$$ boxes, arranged in a row. The $$$i$$$-th box contains $$$a_i$$$ magazines. Some of the boxes are covered with lids, others are not. Suddenly it started to rain, and now Monoca... | 1,100 | false | true | false | true | false | true | false | false | false | false | 1,822 |
979A | Katie, Kuro and Shiro are best friends. They have known each other since kindergarten. That's why they often share everything with each other and work together on some very hard problems. Today is Shiro's birthday. She really loves pizza so she wants to invite her friends to the pizza restaurant near her house to celeb... | 1,000 | true | false | false | false | false | false | false | false | false | false | 5,811 |
827D | Problem - 827D - 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... | 2,700 | false | false | false | false | true | false | false | false | false | true | 6,452 |
1900E | You are given a directed graph $$$G$$$ with $$$n$$$ vertices and $$$m$$$ edges between them. Initially, graph $$$H$$$ is the same as graph $$$G$$$. Then you decided to perform the following actions: If there exists a triple of vertices $$$a$$$, $$$b$$$, $$$c$$$ of $$$H$$$, such that there is an edge from $$$a$$$ to $$... | 2,100 | false | false | true | true | false | false | false | false | false | true | 911 |
14D | Problem - 14D - 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,900 | false | false | false | true | false | false | false | false | false | true | 9,922 |
1943E2 | This is the hard version of the problem. The only difference between the two versions is the constraint on $$$t$$$, $$$m$$$ and the sum of $$$m$$$. You can make hacks only if both versions of the problem are solved. Alice and Bob play yet another game on an array $$$a$$$ of size $$$n$$$. Alice starts with an empty arra... | 3,300 | false | true | false | false | false | false | false | true | false | false | 617 |
2005E2 | This is the hard version of the problem. The differences between the two versions are the constraints on all the variables. You can make hacks only if both versions of the problem are solved. Tsovak and Narek are playing a game. They have an array $$$a$$$ and a matrix $$$b$$$ of integers with $$$n$$$ rows and $$$m$$$ c... | 2,500 | false | true | true | true | true | false | false | false | false | false | 218 |
1761F1 | This is the easy version of the problem. The only difference between the two versions is the constraint on $$$n$$$. You can make hacks only if all versions of the problem are solved. Let's call an array $$$a$$$ of odd length $$$2m+1$$$ (with $$$m ge 1$$$) bad, if element $$$a_{m+1}$$$ is equal to the median of this arr... | 3,100 | true | false | false | true | false | false | false | false | false | false | 1,743 |
1693B | We are given a rooted tree consisting of $$$n$$$ vertices numbered from $$$1$$$ to $$$n$$$. The root of the tree is the vertex $$$1$$$ and the parent of the vertex $$$v$$$ is $$$p_v$$$. There is a number written on each vertex, initially all numbers are equal to $$$0$$$. Let's denote the number written on the vertex $$... | 1,700 | false | true | false | true | false | false | false | false | false | false | 2,121 |
1443C | Petya is preparing for his birthday. He decided that there would be $$$n$$$ different dishes on the dinner table, numbered from $$$1$$$ to $$$n$$$. Since Petya doesn't like to cook, he wants to order these dishes in restaurants. Unfortunately, all dishes are prepared in different restaurants and therefore Petya needs t... | 1,400 | false | true | false | false | false | false | false | true | true | false | 3,456 |
412B | 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 organizers believe that the data transfer speed directly affects the result. The higher the speed of the Internet is, the faster the participant will find the necess... | 900 | false | true | false | false | false | false | false | false | true | false | 8,178 |
1886B | Monocarp tries to get home from work. He is currently at the point $$$O = (0, 0)$$$ of a two-dimensional plane; his house is at the point $$$P = (P_x, P_y)$$$. Unfortunately, it is late in the evening, so it is very dark. Monocarp is afraid of the darkness. He would like to go home along a path illuminated by something... | 1,200 | true | false | false | false | false | false | false | true | false | false | 976 |
1932F | There is a fun game where you need to feed cats that come and go. The level of the game consists of $$$n$$$ steps. There are $$$m$$$ cats; the cat $$$i$$$ is present in steps from $$$l_i$$$ to $$$r_i$$$, inclusive. In each step, you can feed all the cats that are currently present or do nothing. If you feed the same ca... | 1,900 | false | false | false | true | true | false | false | false | true | false | 689 |
534B | The on-board computer on Polycarp's car measured that the car speed at the beginning of some section of the path equals _v_1 meters per second, and in the end it is _v_2 meters per second. We know that this section of the route took exactly _t_ seconds to pass. Assuming that at each of the seconds the speed is constant... | 1,400 | true | true | false | true | false | false | false | false | false | false | 7,700 |
721B | Vanya is managed to enter his favourite site Codehorses. Vanya uses _n_ distinct passwords for sites at all, however he can't remember which one exactly he specified during Codehorses registration. Vanya will enter passwords in order of non-decreasing their lengths, and he will enter passwords of same length in arbitra... | 1,100 | true | false | true | false | false | false | false | false | true | false | 6,930 |
1700C | Little Leon lives in the forest. He has recently noticed that some trees near his favourite path are withering, while the other ones are overhydrated so he decided to learn how to control the level of the soil moisture to save the trees. There are $$$n$$$ trees growing near the path, the current levels of moisture of e... | 1,700 | false | true | false | false | true | true | false | false | false | false | 2,080 |
2014F | Why, master," quoth Little John, taking the bags and weighing them in his hand, "here is the chink of gold." The folk hero Robin Hood has been troubling Sheriff of Nottingham greatly. Sheriff knows that Robin Hood is about to attack his camps and he wants to be prepared. Sheriff of Nottingham built the camps with strat... | 2,000 | false | true | false | true | false | false | false | false | false | false | 166 |
1060H | You are given integers $$$d$$$ and $$$p$$$, $$$p$$$ is prime. Also you have a mysterious device. It has memory cells, each contains an integer between $$$0$$$ and $$$p-1$$$. Also two instructions are supported, addition and raising to the $$$d$$$-th power. $$$ extbf{Both are modulo}$$$ $$$p$$$. The memory cells are num... | 3,300 | false | false | false | false | false | true | false | false | false | false | 5,409 |
611A | Today is Wednesday, the third day of the week. What's more interesting is that tomorrow is the last day of the year 2015. Limak is a little polar bear. He enjoyed this year a lot. Now, he is so eager to the coming year 2016. Limak wants to prove how responsible a bear he is. He is going to regularly save candies for th... | 900 | false | false | true | false | false | false | false | false | false | false | 7,401 |
18C | Problem - 18C - 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 | true | false | false | false | false | false | 9,903 |
730K | Berland consists of _n_ cities and _m_ bidirectional roads connecting pairs of cities. There is no road connecting a city to itself, and between any pair of cities there is no more than one road. It is possible to reach any city from any other moving along roads. Currently Mr. President is in the city _s_ and his desti... | 3,200 | false | false | false | false | false | false | false | false | false | true | 6,878 |
1120F | Little W and Little P decided to send letters to each other regarding the most important events during a day. There are $$$n$$$ events during a day: at time moment $$$t_i$$$ something happens to the person $$$p_i$$$ ($$$p_i$$$ is either W or P, denoting Little W and Little P, respectively), so he needs to immediately s... | 3,100 | false | true | false | true | true | false | false | false | false | false | 5,081 |
1894A | Let's consider a game in which two players, A and B, participate. This game is characterized by two positive integers, $$$X$$$ and $$$Y$$$. The game consists of sets, and each set consists of plays. In each play, exactly one of the players, either A or B, wins. A set ends exactly when one of the players reaches $$$X$$$... | 800 | false | false | true | false | false | false | false | false | false | false | 946 |
1792E | Enter Register HOME TOP CATALOG CONTESTS GYM PROBLEMSET GROUPS RATING EDU API CALENDAR HELP RAYAN Educational Codeforces Round 142 (Rated for 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 fo... | 2,400 | false | false | false | true | false | false | true | false | false | false | 1,523 |
1142D | Traveling around the world you noticed that many shop owners raise prices to inadequate values if the see you are a foreigner. You define inadequate numbers as follows: all integers from $$$1$$$ to $$$9$$$ are inadequate; for an integer $$$x ge 10$$$ to be inadequate, it is required that the integer $$$lfloor x / 10 ... | 2,800 | false | false | false | true | false | false | false | false | false | false | 5,010 |
1039D | Problem - 1039D - 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,800 | false | false | false | true | true | false | false | false | false | false | 5,499 |
862D | Mahmoud and Ehab are in the fourth stage now. Dr. Evil has a hidden binary string of length _n_. He guarantees that there is at least one '0' symbol and at least one '1' symbol in it. Now he wants Mahmoud and Ehab to find a position of any '0' symbol and any '1' symbol. In order to do this, Mahmoud and Ehab can ask Dr.... | 2,000 | false | false | false | false | false | false | false | true | false | false | 6,297 |
193A | You've gotten an _n_u2009×u2009_m_ sheet of squared paper. Some of its squares are painted. Let's mark the set of all painted squares as _A_. Set _A_ is connected. Your task is to find the minimum number of squares that we can delete from set _A_ to make it not connected. A set of painted squares is called connected, i... | 1,700 | false | false | false | false | false | true | false | false | false | true | 9,070 |
758D | Problem - 758D - 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... | 2,000 | true | true | false | true | false | true | false | false | false | false | 6,754 |
671E | Kekoland is a country with _n_ beautiful cities numbered from left to right and connected by _n_u2009-u20091 roads. The _i_-th road connects cities _i_ and _i_u2009+u20091 and length of this road is _w__i_ kilometers. When you drive in Kekoland, each time you arrive in city _i_ by car you immediately receive _g__i_ lit... | 3,300 | false | true | false | false | true | false | false | false | false | false | 7,136 |
731D | Archeologists have found a secret pass in the dungeon of one of the pyramids of Cycleland. To enter the treasury they have to open an unusual lock on the door. The lock consists of _n_ words, each consisting of some hieroglyphs. The wall near the lock has a round switch. Each rotation of this switch changes the hierogl... | 2,200 | false | true | false | false | true | false | true | false | true | false | 6,873 |
117D | Let _a_ be an array consisting of _n_ numbers. The array's elements are numbered from 1 to _n_, _even_ is an array consisting of the numerals whose numbers are even in _a_ (_even__i_u2009=u2009_a_2_i_, 1u2009≤u20092_i_u2009≤u2009_n_), _odd_ is an array consisting of the numberals whose numbers are odd in _а_ (_odd__i_u... | 2,500 | true | false | false | false | false | false | false | false | false | false | 9,418 |
1523C | William is a huge fan of planning ahead. That is why he starts his morning routine by creating a nested list of upcoming errands. A valid nested list is any list which can be created from a list with one item "1" by applying some operations. Each operation inserts a new item into the list, on a new line, just after one... | 1,600 | false | true | true | false | true | false | true | false | false | false | 3,048 |
1719C | Burenka is about to watch the most interesting sporting event of the year — a fighting tournament organized by her friend Tonya. $$$n$$$ athletes participate in the tournament, numbered from $$$1$$$ to $$$n$$$. Burenka determined the strength of the $$$i$$$-th athlete as an integer $$$a_i$$$, where $$$1 leq a_i leq n$$... | 1,400 | false | false | true | false | true | false | false | true | false | false | 1,966 |
1560F1 | Problem - 1560F1 - 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 | true | false | false | false | true | true | true | false | false | 2,825 |
1416A | You are given an array $$$a$$$ consisting of $$$n$$$ integers numbered from $$$1$$$ to $$$n$$$. Let's define the $$$k$$$-amazing number of the array as the minimum number that occurs in all of the subsegments of the array having length $$$k$$$ (recall that a subsegment of $$$a$$$ of length $$$k$$$ is a contiguous part ... | 1,500 | false | false | true | false | true | false | false | true | false | false | 3,602 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.