随笔分类 -  Codeforces

摘要:DescriptionJaehyun has two lists of integers, namely a 1 ,...,a N and b 1 ,...,b M . Jeffrey wants to know what thesenumbers are, but Jaehyun won’t te... 阅读全文
posted @ 2016-01-16 19:30 meekyan 阅读(503) 评论(0) 推荐(0)
摘要:DescriptionFedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression:(1n + 2n + 3n + 4n)mod5for given value ofn. F... 阅读全文
posted @ 2016-01-12 15:12 meekyan 阅读(509) 评论(0) 推荐(0)
摘要:B. Longtail HedgehogThis Christmas Santa gave Masha a magic picture and a pencil. The picture consists ofnpoints connected bymsegments (they might cro... 阅读全文
posted @ 2016-01-09 00:50 meekyan 阅读(186) 评论(0) 推荐(0)
摘要:C. New Year and DominoThey say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't think so.Limak is a ... 阅读全文
posted @ 2015-12-31 23:54 meekyan 阅读(377) 评论(0) 推荐(0)
摘要:B. New Year and Old PropertyThe year 2015 is almost over.Limak is a little polar bear. He has recently learnt about the binary system. He noticed that... 阅读全文
posted @ 2015-12-31 23:48 meekyan 阅读(291) 评论(0) 推荐(0)
摘要:A. New Year and DaysToday 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 ... 阅读全文
posted @ 2015-12-31 23:45 meekyan 阅读(234) 评论(0) 推荐(0)
摘要:D. The Union of k-SegmentsYou re givennsegments on the coordinate axisOxand the numberk. The point issatisfiedif it belongs to at leastksegments. Find... 阅读全文
posted @ 2015-12-28 14:37 meekyan 阅读(306) 评论(0) 推荐(0)
摘要:C. Harmony AnalysisThe semester is already ending, so Danil made an effort and decided to visit a lesson on harmony analysis to know how does the prof... 阅读全文
posted @ 2015-12-27 22:35 meekyan 阅读(316) 评论(1) 推荐(1)
摘要:B. Vika and SquaresVika hasnjars with paints of distinct colors. All the jars are numbered from1tonand thei-th jar containsailiters of paint of colori... 阅读全文
posted @ 2015-12-27 22:29 meekyan 阅读(297) 评论(1) 推荐(0)
摘要:A. Pasha and StickPasha has a wooden stick of some positive integer lengthn. He wants to perform exactly three cuts to get four parts of the stick. Ea... 阅读全文
posted @ 2015-12-27 22:25 meekyan 阅读(251) 评论(0) 推荐(0)
摘要:D. ZumaGenos recently installed the game Zuma on his phone. In Zuma there exists a line ofngemstones, thei-th of which has colorci. The goal of the ga... 阅读全文
posted @ 2015-12-24 16:43 meekyan 阅读(303) 评论(0) 推荐(0)
摘要:C. Chain ReactionThere arenbeacons located at distinct positions on a number line. Thei-th beacon has positionaiand power levelbi. When thei-th beacon... 阅读全文
posted @ 2015-12-24 12:59 meekyan 阅读(650) 评论(0) 推荐(0)
摘要:B. Hamming Distance SumGenos needs your help. He was asked to solve the following programming problem by Saitama:The length of some stringsis denoted|... 阅读全文
posted @ 2015-12-24 12:53 meekyan 阅读(422) 评论(0) 推荐(0)
摘要:A. Saitama Destroys HotelSaitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one... 阅读全文
posted @ 2015-12-24 12:48 meekyan 阅读(171) 评论(0) 推荐(0)
摘要:D. Lazy StudentStudent Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a grap... 阅读全文
posted @ 2015-12-11 17:22 meekyan 阅读(278) 评论(0) 推荐(0)
摘要:C. Sorting Railway CarsAn infinitely long railway has a train consisting ofncars, numbered from1ton(the numbers of all the cars are distinct) and posi... 阅读全文
posted @ 2015-12-10 11:14 meekyan 阅读(448) 评论(0) 推荐(0)
摘要:A. Magic SpheresCarl is a beginner magician. He hasablue,bviolet andcorange magic spheres. In one move he can transform two spheresof the same colorin... 阅读全文
posted @ 2015-12-10 11:10 meekyan 阅读(225) 评论(0) 推荐(0)
摘要:D. New Year Santa NetworkNew Year is coming in Tree World! In this world, as the name implies, there arencities connected byn - 1roads, and for any tw... 阅读全文
posted @ 2015-12-03 14:30 meekyan 阅读(375) 评论(0) 推荐(0)
摘要:D. Spongebob and SquaresSpongebob is already tired trying to reason his weird actions and calculations, so he simply asked you to find all pairs of n ... 阅读全文
posted @ 2015-11-21 17:45 meekyan 阅读(348) 评论(0) 推荐(0)
摘要:C. Day at the BeachOne day Squidward, Spongebob and Patrick decided to go to the beach. Unfortunately, the weather was bad, so the friends were unable... 阅读全文
posted @ 2015-11-21 17:42 meekyan 阅读(281) 评论(0) 推荐(0)