![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces
文章平均质量分 79
1615925431
这个作者很懒,什么都没留下…
展开
-
Educational Codeforces Round 52 (Rated for Div. 2) C. Make It Equal
C. Make It Equal There is a toy building consisting of nn towers. Each tower consists of several cubes standing on each other. The ii-th tower consists of hihicubes, so it has height hihi.Let's ...原创 2018-10-27 17:36:14 · 192 阅读 · 0 评论 -
Educational Codeforces Round 44 (Rated for Div. 2) C. Liebig's Barrels
C. Liebig's BarrelsYou have m = n·k wooden staves. The i-th stave has length ai. You have to assemble n barrels consisting of k staves each, you can use any k staves to construct a barrel. Each stave ...原创 2018-05-23 18:06:07 · 285 阅读 · 0 评论 -
Codeforces Round #483 (Div. 2) [Thanks, Botan Investments and Victor Shaburov!] A. Game
A. GameTwo players play a game.Initially there are nn integers a1,a2,…,ana1,a2,…,an written on the board. Each turn a player selects one number and erases it from the board. This continues until there...原创 2018-05-23 18:00:57 · 179 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) C. Valhalla Siege
C. Valhalla SiegeIvar the Boneless is a great leader. He is trying to capture Kattegat from Lagertha. The war has begun and wave after wave Ivar's warriors are falling in battle.Ivar has nn warriors, ...原创 2018-05-11 16:57:48 · 252 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) B. Mancala
B. MancalaMancala is a game famous in the Middle East. It is played on a board that consists of 14 holes.Initially, each hole has aiai stones. When a player makes a move, he chooses a hole which conta...原创 2018-05-11 16:44:52 · 184 阅读 · 0 评论 -
Codeforces Round #478 (Div. 2) A. Aramic script
A. Aramic scriptIn Aramic language words can only represent objects.Words in Aramic have special properties:A word is a root if it does not contain the same letter more than once.A root and all its pe...原创 2018-05-11 16:28:37 · 95 阅读 · 0 评论 -
Codeforces Round #480 (Div. 2) C. Posterized
C. PosterizedProfessor Ibrahim has prepared the final homework for his algorithm’s class. He asked his students to implement the Posterization Image Filter.Their algorithm will be tested on an array o...原创 2018-05-09 16:21:53 · 349 阅读 · 0 评论 -
Codeforces Round #480 (Div. 2) B. Marlin
B. MarlinThe city of Fishtopia can be imagined as a grid of 44 rows and an odd number of columns. It has two main villages; the first is located at the top-left cell (1,1)(1,1), people who stay there ...原创 2018-05-09 16:12:52 · 247 阅读 · 0 评论 -
Codeforces Round #480 (Div. 2) A. Links and Pearls
A. Links and PearlsA necklace can be described as a string of links ('-') and pearls ('o'), with the last link or pearl connected to the first one.You can remove a link or a pearl and insert it betwee...原创 2018-05-09 15:40:09 · 246 阅读 · 0 评论 -
Codeforces Round #468 C. Laboratory Work
C. Laboratory WorkAnya and Kirill are doing a physics laboratory work. In one of the tasks they have to measure some value n times, and then compute the average value to lower the error.Kirill has alr...原创 2018-03-05 19:33:30 · 195 阅读 · 0 评论 -
Codeforces Round #468 B. World Cup
B. World CupThe last stage of Football World Cup is played using the play-off system.There are n teams left in this stage, they are enumerated from 1 to n. Several rounds are held, in each round the r...原创 2018-03-05 17:49:30 · 459 阅读 · 0 评论 -
Codeforces Round #468 A. Friends Meeting
A. Friends MeetingTwo friends are on the coordinate axis Ox in points with integer coordinates. One of them is in the point x1 = a, another one is in the point x2 = b.Each of the friends can move by o...原创 2018-03-05 17:41:03 · 261 阅读 · 0 评论 -
Codeforces Round #470 (rated, Div. 2, based on VK Cup 2018 Round 1) C. Producing Snow
C. Producing SnowAlice likes snow a lot! Unfortunately, this year's winter is already over, and she can't expect to have any more of it. Bob has thus bought her a gift — a large snow maker. He plans t...原创 2018-03-11 21:13:08 · 255 阅读 · 0 评论 -
Avito Code Challenge 2018 C. Useful Decomposition
C. Useful DecompositionRamesses knows a lot about problems involving trees (undirected connected graphs without cycles)!He created a new useful tree decomposition, but he does not know how to construc...原创 2018-07-09 14:32:49 · 145 阅读 · 0 评论 -
Codeforces Round #486 (Div. 3) B. Substrings Sort
B. Substrings SortYou are given nn strings. Each string consists of lowercase English letters. Rearrange (reorder) the given strings in such a way that for every string, all strings that are placed be...原创 2018-07-11 08:31:09 · 110 阅读 · 0 评论 -
Codeforces Round #514 (Div. 2) C. Sequence Transformation
C. Sequence Transformation Let's call the following process a transformation of a sequence of length nn.If the sequence is empty, the process ends. Otherwise, append the greatest common divisor ...原创 2018-10-31 19:38:55 · 190 阅读 · 0 评论 -
Codeforces Round #519 by Botan Investments C. Smallest Word
C. Smallest Word IA has so many colorful magnets on her fridge! Exactly one letter is written on each magnet, 'a' or 'b'. She loves to play with them, placing all magnets in a row. However, the gi...原创 2018-10-29 20:27:26 · 311 阅读 · 0 评论 -
Educational Codeforces Round 53 (Rated for Div. 2) B. Vasya and Books
B. Vasya and Books Vasya has got nn books, numbered from 11 to nn, arranged in a stack. The topmost book has number a1a1, the next one — a2a2, and so on. The book at the bottom of the stack has nu...原创 2018-10-29 15:43:58 · 224 阅读 · 0 评论 -
Mail.Ru Cup 2018 Round 1 C. Candies Distribution
C. Candies Distribution There are nn children numbered from 11 to nn in a kindergarten. Kindergarten teacher gave aiai (1≤ai≤n1≤ai≤n) candies to the ii-th child. Children were seated in a row in o...原创 2018-10-26 11:25:14 · 469 阅读 · 0 评论 -
Codeforces Round #516 (Div. 2, by Moscow Team Olympiad) B. Equations of Mathematical Magic
B. Equations of Mathematical Magic Colossal! — exclaimed Hawk-nose. — A programmer! That's exactly what we are looking for.Arkadi and Boris Strugatsky. Monday starts on SaturdayReading the boo...原创 2018-10-23 10:15:34 · 183 阅读 · 0 评论 -
Educational Codeforces Round 53 (Rated for Div. 2) A. Diverse Substring
A. Diverse Substring You are given a string ss, consisting of nn lowercase Latin letters.A substring of string ss is a continuous segment of letters from ss. For example, "defor" is a substring ...原创 2018-10-28 16:40:50 · 634 阅读 · 0 评论 -
Mail.Ru Cup 2018 Round 1 B. Appending Mex
B. Appending Mex Initially Ildar has an empty array. He performs nn steps. On each step he takes a subset of integers already added to the array and appends the mex of this subset to the array.T...原创 2018-10-25 10:17:26 · 300 阅读 · 0 评论 -
Educational Codeforces Round 51 (Rated for Div. 2) A. Vasya And Password
A. Vasya And Password Vasya came up with a password to register for EatForces — a string ss. The password in EatForces should be a string, consisting of lowercase and uppercase Latin letters and d...原创 2018-10-20 10:58:04 · 173 阅读 · 0 评论 -
Manthan, Codefest 18 (rated, Div. 1 + Div. 2) D. Valid BFS?
D. Valid BFS?The BFS algorithm is defined as follows.Consider an undirected graph with vertices numbered from 11 to nn. Initialize qq as a new queue containing only vertex 11, mark the vertex 11as...原创 2018-10-10 09:33:59 · 150 阅读 · 0 评论 -
Codeforces Round #508 (Div. 2) D. Slime
D. SlimeThere are nn slimes in a row. Each slime has an integer value (possibly negative or zero) associated with it.Any slime can eat its adjacent slime (the closest slime to its left or to its r...原创 2018-10-09 09:29:03 · 224 阅读 · 0 评论 -
Codeforces Round #509 (Div. 2) C. Coffee Break
C. Coffee BreakRecently Monocarp got a job. His working day lasts exactly mm minutes. During work, Monocarp wants to drink coffee at certain moments: there are nn minutes a1,a2,…,ana1,a2,…,an, when ...原创 2018-09-28 19:03:50 · 396 阅读 · 0 评论 -
Codeforces Round #510 (Div. 2) C. Array Product
C. Array ProductYou are given an array aa consisting of nn integers. You can perform the following operations with it:Choose some positions ii and jj (1≤i,j≤n,i≠j1≤i,j≤n,i≠j), write the value of a...原创 2018-09-26 16:34:07 · 187 阅读 · 0 评论 -
Codeforces Round #487 (Div. 2) C. A Mist of Florescence
C. A Mist of Florescence As the boat drifts down the river, a wood full of blossoms shows up on the riverfront."I've been here once," Mino exclaims with delight, "it's breathtakingly amazing."...原创 2018-07-19 11:57:57 · 172 阅读 · 0 评论 -
Educational Codeforces Round 45 (Rated for Div. 2) C. Bracket Sequences Concatenation Problem
C. Bracket Sequences Concatenation ProblemA bracket sequence is a string containing only characters "(" and ")".A regular bracket sequence is a bracket sequence that can be transformed into a correct ...原创 2018-07-13 09:22:06 · 163 阅读 · 0 评论 -
Codeforces Round #486 (Div. 3) C. Equal Sums map+结构体
C. Equal SumsYou are given kk sequences of integers. The length of the ii-th sequence equals to nini.You have to choose exactly two sequences ii and jj (i≠ji≠j) such that you can remove exactly one el...原创 2018-07-11 15:07:40 · 134 阅读 · 0 评论 -
Codeforces Round #470 (rated, Div. 2, based on VK Cup 2018 Round 1) A. Protect Sheep
A. Protect SheepBob is a farmer. He has a large pasture with many sheep. Recently, he has lost some of them due to wolf attacks. He thus decided to place some shepherd dogs in such a way that all his ...原创 2018-03-11 20:52:36 · 251 阅读 · 0 评论 -
Codeforces Round #466 (Div. 2) B. Our Tanya is Crying Out Loud
B. Our Tanya is Crying Out LoudRight now she actually isn't. But she will be, if you don't solve this problem.You are given integers n, k, A and B. There is a number x, which is initially equal to n. ...原创 2018-02-25 11:56:16 · 359 阅读 · 0 评论 -
Codeforces Round #466 (Div. 2) A. Points on the line
A. Points on the lineWe've got no test cases. A big olympiad is coming up. But the problemsetters' number one priority should be adding another problem to the round.The diameter of a multiset of point...原创 2018-02-24 20:33:24 · 661 阅读 · 0 评论 -
Codeforces 919C Seat Arrangements
C. Seat ArrangementsSuppose that you are in a campus and have to go for classes day by day. As you may see, when you hurry to a classroom, you surprisingly find that many seats there are already occup...原创 2018-02-08 21:49:00 · 368 阅读 · 0 评论 -
Codeforces 916A Jamie and Alarm Snooze
A. Jamie and Alarm SnoozeJamie loves sleeping. One day, he decides that he needs to wake up at exactly hh: mm. However, he hates waking up, so he wants to make waking up less painful by setting the al...原创 2018-02-11 09:41:58 · 253 阅读 · 0 评论 -
Codeforces 918A Eleven
A. ElevenEleven wants to choose a new name for herself. As a bunch of geeks, her friends suggested an algorithm to choose a name for her. Eleven wants her name to have exactly n characters.Her friend ...原创 2018-02-11 19:24:06 · 278 阅读 · 0 评论 -
Codeforces 922A Cloning Toys
A. Cloning ToysImp likes his plush toy a lot.Recently, he found a machine that can clone plush toys. Imp knows that if he applies the machine to an original toy, he additionally gets one more original...原创 2018-02-12 10:56:54 · 333 阅读 · 0 评论 -
Codeforces 934B A Prosperous Lot
B. A Prosperous LotApart from Nian, there is a daemon named Sui, which terrifies children and causes them to become sick. Parents give their children money wrapped in red packets and put them under th...原创 2018-02-14 23:00:08 · 335 阅读 · 0 评论 -
Codeforces 934A A Compatible Pair
A. A Compatible PairNian is a monster which lives deep in the oceans. Once a year, it shows up on the land, devouring livestock and even people. In order to keep the monster away, people fill their vi...原创 2018-02-14 23:15:47 · 803 阅读 · 0 评论 -
codeforces 920A Water The Garden
A. Water The GardenIt is winter now, and Max decided it's about time he watered the garden.The garden can be represented as n consecutive garden beds, numbered from 1 to n. k beds contain water taps (...原创 2018-02-13 21:38:58 · 603 阅读 · 0 评论