![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CodeForces
文章平均质量分 77
Zhac
菜菜菜
展开
-
CodeForces 510BFox And Two Dots(dfs)
DescriptionFox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n × m cells, like this:Each cell contains a dot that has some color. We wi原创 2016-08-15 11:08:52 · 391 阅读 · 0 评论 -
CodeForces 610APasha 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 the原创 2016-07-21 15:25:22 · 325 阅读 · 0 评论 -
CodeForces612AThe Text Splitting(模拟,暴力枚举)
DescriptionYou are given the string s of length n and the numbers p, q. Split the string s to pieces of length p and q.For example, the string "Hello" for p = 2, q = 3 can be split to the two st原创 2016-07-21 15:02:50 · 289 阅读 · 0 评论 -
CodeForces597ADivisibility(数学)
DescriptionFind the number of k-divisible numbers on the segment [a, b]. In other words you need to find the number of such integer values x that a ≤ x ≤ b and x is divisible by k.InputThe onl原创 2016-05-31 12:58:12 · 356 阅读 · 0 评论 -
CodeForces598ATric(数学,求和)
Description求和是一种最常见的运算,我们经常做的就是1加到n的和。例如,1加到100的和是5050。但是现在,我们稍微变动一下求和方法,对于属于2的幂次的数,我们做的是减法,其余仍旧做加法。例如,当n=4的时候,最后的结果应该是-1-2+3-4=-4,因为1、2、4分别是2的0次方、2的1次方、2的2次方。现在请你来计算t次这样的运算。Input输入第一行是一个正整数t,原创 2016-07-21 12:42:51 · 347 阅读 · 0 评论 -
CodeForces599APatrick and Shopping(数学,简易版最短路)
Description Today Patrick waits for a visit from his friend Spongebob. To prepare for the visit, Patrick needs to buy some goodies in two stores located near his house. There is a d1 meter long road b原创 2016-07-21 12:50:56 · 459 阅读 · 0 评论 -
CodeForces675BRestoring Painting(数学规律计算)
DescriptionVasya works as a watchman in the gallery. Unfortunately, one of the most expensive paintings was stolen while he was on duty. He doesn't want to be fired, so he has to quickly restore t原创 2016-05-27 17:53:13 · 422 阅读 · 0 评论 -
CodeForces673BProblems for Round(比大小)
DescriptionThere are n problems prepared for the next Codeforces round. They are arranged in ascending order by their difficulty, and no two problems have the same difficulty. Moreover, there are m原创 2016-05-29 14:34:13 · 317 阅读 · 0 评论 -
CodeForces 366A Dima and Guards(结构体,数学)
DescriptionNothing has changed since the last round. Dima and Inna still love each other and want to be together. They've made a deal with Seryozha and now they need to make a deal with the dorm gua原创 2016-05-30 17:54:14 · 345 阅读 · 0 评论 -
Codeforces Round #346 (Div. 2)Round House(数学,找规律)
DescriptionVasya lives in a round building, whose entrances are numbered sequentially by integers from 1 to n. Entrance n and entrance 1 are adjacent.Today Vasya got bored and decided to take a原创 2016-05-30 18:32:21 · 336 阅读 · 0 评论 -
CodeForces604AUncowed 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, res原创 2016-07-21 12:56:53 · 261 阅读 · 0 评论 -
CodeForces611ANew 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-07-21 20:08:34 · 545 阅读 · 0 评论 -
CodeForces 632BAlice, Bob, Two Teams
DescriptionAlice and Bob are playing a game. The game involves splitting up game pieces into two teams. There are n pieces, and the i-th piece has a strength pi.The way to split up game pieces i原创 2016-08-23 10:10:38 · 231 阅读 · 0 评论 -
CodeForces 658ABear and Reverse Radewoosh(数学)
DescriptionLimak and Radewoosh are going to compete against each other in the upcoming algorithmic contest. They are equally skilled but they won't solve problems in the same order.There will be原创 2016-08-23 10:03:42 · 277 阅读 · 0 评论 -
CodeForces 554BOhana Cleans Up(思维)
DescriptionOhana Matsumae is trying to clean a room, which is divided up into an n by n grid of squares. Each square is initially either clean or dirty. Ohana can sweep her broom over columns of the原创 2016-08-23 09:58:40 · 323 阅读 · 0 评论 -
CodeForces 660ACo-prime Array(GCD+思维)
DescriptionYou are given an array of n elements, you must make it a co-prime array in as few moves as possible.In each move you can insert any positive integral number you want not greater than原创 2016-08-23 09:00:16 · 311 阅读 · 0 评论 -
CodeForces667APouring Rain(数学)
DescriptionA lot of people in Berland hates rain, but you do not. Rain pacifies, puts your thoughts in order. By these years you have developed a good tradition — when it rains, you go on the stre原创 2016-05-26 15:53:57 · 456 阅读 · 0 评论 -
CodeForces599BSpongebob and Joke
DescriptionWhile Patrick was gone shopping, Spongebob decided to play a little trick on his friend. The naughty Sponge browsed through Patrick's personal stuff and found a sequence a1, a2, ..., am o转载 2016-07-21 21:28:34 · 288 阅读 · 0 评论 -
CodeForces612BHDD is Outdated Technology(sort,结构体,水题)
DescriptionHDD hard drives group data by sectors. All files are split to fragments and each of them are written in some sector of hard drive. Note the fragments can be written in sectors in arbitrar原创 2016-07-21 20:23:12 · 189 阅读 · 0 评论 -
CodeForces597BRestaurant(sort+贪心)
DescriptionA restaurant received n orders for the rental. Each rental order reserve the restaurant for a continuous period of time, the i-th order is characterized by two time values — the start tim原创 2016-07-21 20:19:08 · 272 阅读 · 0 评论 -
CodeForces615ABulbs(水题)
DescriptionVasya wants to turn on Christmas lights consisting of m bulbs. Initially, all bulbs are turned off. There are n buttons, each of them is connected to some set of bulbs. Vasya can press an原创 2016-07-21 20:12:42 · 373 阅读 · 0 评论 -
CodeForces 638 A Home Numbers(数学,水题)
DescriptionThe main street of Berland is a straight line with n houses built along it (n is an even number). The houses are located at both sides of the street. The houses with odd numbers are at on原创 2016-05-30 19:01:34 · 278 阅读 · 0 评论 -
CodeForces 300A Array(快排)
DescriptionVitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold:The product of all numbers in the first set原创 2016-05-30 19:29:17 · 363 阅读 · 0 评论 -
CodeForces 669ALittle Artem and Presents
DescriptionLittle Artem got n stones on his birthday and now wants to give some of them to Masha. He knows that Masha cares more about the fact of receiving the present, rather than the value of t原创 2016-05-26 11:08:15 · 264 阅读 · 0 评论 -
CodeForces673ABear and Game
DescriptionBear Limak likes watching sports on TV. He is going to watch a game today. The game lasts 90 minutes and there are no breaks.Each minute can be either interesting or boring. If 15 con原创 2016-05-26 11:01:47 · 209 阅读 · 0 评论 -
CodeForces675AInfinite Sequence
DescriptionVasya likes everything infinite. Now he is studying the properties of a sequence s, such that its first element is equal to a (s1 = a), and the difference between any two neighbouring原创 2016-05-26 10:56:31 · 405 阅读 · 0 评论 -
CodeForces650AWatchmen
DescriptionWatchmen are in a danger and Doctor Manhattan together with his friend Daniel Dreiberg should warn them as soon as possible. There are n watchmen on a plane, the i-th watchman is loca原创 2016-05-26 10:49:33 · 442 阅读 · 0 评论 -
CodeForces621BWet Shark and Bishops
DescriptionToday, Wet Shark is given n bishops on a 1000 by 1000 grid. Both rows and columns of the grid are numbered from 1 to 1000. Rows are numbered from top to bottom, while columns are numb原创 2016-05-26 10:41:46 · 236 阅读 · 0 评论 -
CodeForces651AJoysticks
DescriptionFriends are going to play console. They have two joysticks and only one charger for them. Initially first joystick is charged at a1 percent and second one is charged at a2 percent. Yo原创 2016-05-26 10:35:14 · 280 阅读 · 0 评论 -
CodeForces670AHolidays
DescriptionOn the planet Mars a year lasts exactly n days (there are no leap years on Mars). But Martians have the same weeks as earthlings — 5 work days and then 2 days off. Your task is to deter原创 2016-05-24 18:33:02 · 300 阅读 · 0 评论 -
Codeforces 621AWet Shark and Odd and Even
DescriptionToday, Wet Shark is given n integers. Using any of these integers no more than once, Wet Shark wants to get maximum possible even (divisible by 2) sum. Please, calculate this value fo原创 2016-05-24 18:02:36 · 278 阅读 · 0 评论 -
CodeForces - 630a
DescriptionThe HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. "Do I give such a hard task?" — the HR manager thought. "Just raise numb原创 2016-03-07 18:01:17 · 418 阅读 · 0 评论 -
CodeForces651BBeautiful Paintings
DescriptionThere are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes happy every time he passes from a painting to a more beautiful o原创 2016-05-26 15:32:11 · 384 阅读 · 0 评论 -
CodeForces66APetya and Java
DescriptionLittle Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is原创 2016-05-17 14:35:19 · 356 阅读 · 0 评论 -
CodeForces 653 A. Bear and Three Balls(数学 ,快排)
DescriptionLimak is a little polar bear. He has n balls, the i-th ball has size ti.Limak wants to give one ball to each of his three friends. Giving gifts isn't easy — there are two rules Limak原创 2016-05-30 19:55:14 · 372 阅读 · 0 评论 -
CodeForces 624A Save Luke(相对,数学)
DescriptionLuke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will ass原创 2016-05-30 20:05:06 · 290 阅读 · 0 评论 -
Codeforces 612C: Replace To Make Regular Bracket Sequence(栈)
DescriptionYou are given string s consists of opening and closing brackets of four kinds <>, {}, [], (). There are two types of brackets: opening and closing. You can replace any bracket by another原创 2016-07-28 09:43:33 · 262 阅读 · 0 评论 -
CodeForces 698A Vacations(贪心)
DescriptionVasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a原创 2016-07-23 17:04:28 · 404 阅读 · 0 评论 -
CodeForces 629BFar Relative’s Problem(贪心)
DescriptionFamil Door wants to celebrate his birthday with his friends from Far Far Away. He has n friends and each of them can come to the party in a specific range of days of the year from ai to b原创 2016-07-23 16:53:28 · 197 阅读 · 0 评论 -
CodeForces 96AFootball
DescriptionPetya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it原创 2016-05-22 13:32:15 · 285 阅读 · 0 评论