![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
水题
慧需一饮三百杯
这个作者很懒,什么都没留下…
展开
-
Cookies
DescriptionFangy collects cookies. Once he decided to take a box and put cookies into it in some way. If we take a squarek × k in size, divided into blocks1 × 1 in size and paint there the mai原创 2016-02-26 15:32:34 · 211 阅读 · 0 评论 -
USB Flash Drives
DescriptionSean is trying to save a large file to a USB flash drive. He has n USB flash drives with capacities equal to a1, a2, ..., an megabytes. The file size is equal tom megabytes. Fin原创 2016-02-26 16:27:19 · 408 阅读 · 0 评论 -
Pasha and Stick
DescriptionPasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive integer length and原创 2016-02-26 16:29:55 · 169 阅读 · 0 评论 -
Two Bases
DescriptionAfter seeing the "ALL YOUR BASE ARE BELONG TO US" meme for the first time, numbersX and Y realised that they have different bases, which complicated their relations.You're given a n原创 2016-02-26 16:30:45 · 250 阅读 · 0 评论 -
Guess the Permutation
DescriptionBob has a permutation of integers from 1 to n. Denote this permutation as p. Thei-th element of p will be denoted aspi. For all pairs of distinct integersi, j between 1 and n,原创 2016-02-26 16:31:52 · 354 阅读 · 0 评论 -
Chewbaсca and Number
DescriptionLuke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digitt means replacing it with digit 9 - t. Hel原创 2016-02-26 16:37:46 · 228 阅读 · 0 评论 -
Comparing Two Long Integers
DescriptionYou are given two very long integers a, b (leading zeroes are allowed). You should check what numbera or b is greater or determine that they are equal.The input size is very large s原创 2016-02-26 16:38:33 · 257 阅读 · 0 评论 -
Simple Game
DescriptionOne day Misha and Andrew were playing a very simple game. First, each player chooses an integer in the range from1 to n. Let's assume that Misha chose numberm, and Andrew chose numb原创 2016-02-26 16:40:14 · 181 阅读 · 0 评论 -
Link/Cut Tree
DescriptionProgrammer Rostislav got seriously interested in the Link/Cut Tree data structure, which is based on Splay trees. Specifically, he is now studying theexpose procedure.Unfortunately,原创 2016-02-26 16:40:54 · 166 阅读 · 0 评论 -
Vitaly and Strings
DescriptionVitaly is a diligent student who never missed a lesson in his five years of studying in the university. He always does his homework on time and passes his exams in time.During the l原创 2016-02-26 16:41:55 · 219 阅读 · 0 评论 -
A-Playing with Paper
DescriptionOne day Vasya was sitting on a not so interesting Maths lesson and making an origami from a rectangulara mm × b mm sheet of paper (a > b). Usually the first step in making an origami原创 2016-02-26 16:44:05 · 393 阅读 · 0 评论 -
B-Queue on Bus Stop
DescriptionIt's that time of the year when the Russians flood their countryside summer cottages (dachas) and the bus stop has a lot of people. People rarely go to the dacha on their own, it's usua原创 2016-02-26 16:45:29 · 264 阅读 · 0 评论 -
Factory
DescriptionOne industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there werex details in the factory st原创 2016-02-26 16:47:37 · 244 阅读 · 0 评论 -
Duff and Meat
DescriptionDuff is addicted to meat! Malek wants to keep her happy for n days. In order to be happy in i-th day, she needs to eat exactlyai kilograms of meat.There is a big shop uptown and原创 2016-02-26 16:25:48 · 222 阅读 · 0 评论 -
Calculating Function
DescriptionFor a positive integer n let's define a functionf:f(n) = - 1 + 2 - 3 + .. + ( - 1)nnYour task is to calculate f(n) for a given integern.InputThe single line contain原创 2016-02-26 16:24:35 · 470 阅读 · 0 评论 -
Drinks
DescriptionLittle Vasya loves orange juice very much. That's why any food and drink in his kitchen necessarily contains orange juice. There aren drinks in his fridge, the volume fraction of oran原创 2016-02-26 15:42:25 · 371 阅读 · 0 评论 -
Limit
DescriptionYou are given two polynomials:P(x) = a0·xn + a1·xn - 1 + ... + an - 1·x + an and Q(x) = b0·xm + b1·xm - 1 + ... + bm - 1·x + bm.Calculate limit .InputThe first lin原创 2016-02-26 15:44:26 · 330 阅读 · 0 评论 -
New Year and Days
DescriptionToday 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,原创 2016-02-26 16:09:51 · 223 阅读 · 0 评论 -
Plate Game
DescriptionYou've got a rectangular table with length a and widthb and the infinite number of plates of radiusr. Two players play the following game: they take turns to put the plates on the t原创 2016-02-26 16:11:17 · 921 阅读 · 0 评论 -
Uncowed Forces
DescriptionKevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500, 2000, and 2500, r原创 2016-02-26 16:12:48 · 171 阅读 · 0 评论 -
Case of the Zeros and Ones
DescriptionAndrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros and ones.Once he thought about a string of length n consisting of原创 2016-02-26 16:13:55 · 197 阅读 · 0 评论 -
Soldier and Badges
DescriptionColonel has n badges. He wants to give one badge to every of hisn soldiers. Each badge has a coolness factor, which shows how much it's owner reached. Coolness factor can be increas原创 2016-02-26 16:15:55 · 265 阅读 · 0 评论 -
Face Detection
DescriptionThe developers of Looksery have to write an efficient algorithm that detects faces on a picture. Unfortunately, they are currently busy preparing a contest for you, so you will have to原创 2016-02-26 16:17:29 · 426 阅读 · 0 评论 -
Two Substrings
DescriptionYou are given string s. Your task is to determine if the given strings contains two non-overlapping substrings "AB" and "BA" (the substrings can go in any order).InputThe原创 2016-02-26 16:18:37 · 214 阅读 · 0 评论 -
Insomnia cure
Description«One dragon. Two dragon. Three dragon», — the princess was counting. She had trouble falling asleep, and she got bored of counting lambs when she was nine.However, just counting drago原创 2016-02-26 16:20:20 · 353 阅读 · 0 评论 -
Alternating Current
DescriptionMad scientist Mike has just finished constructing a new device to search for extraterrestrial intelligence! He was in such a hurry to launch it for the first time that he plugged in the原创 2016-02-26 16:21:24 · 269 阅读 · 0 评论 -
Gravity Flip
DescriptionLittle Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.There a原创 2016-02-26 16:23:27 · 261 阅读 · 0 评论 -
The Best Gift
DescriptionEmily's birthday is next week and Jack has decided to buy a present for her. He knows she loves books so he goes to the local bookshop, where there aren books on sale from one of m原创 2016-02-26 16:48:38 · 255 阅读 · 0 评论