![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
窦小雨
热爱是最好的动力!
展开
-
SDAU 课程练习 1017
Problem DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are always delivered to customers in the sq原创 2016-03-16 12:26:37 · 266 阅读 · 0 评论 -
Codeforces Round #374 (Div. 2) D. Maxim and Array
D. Maxim and Arraytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Maxim has found an array of n i原创 2016-11-04 19:19:25 · 195 阅读 · 0 评论 -
2016 ccpc HDU 5968 异或密码
异或密码Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 101 Accepted Submission(s): 46Problem Description晨晨在纸上写了一个长度为N的非负整数序列{ai}原创 2016-11-05 21:06:47 · 627 阅读 · 0 评论 -
2016 ccpc HDU 5969 最大的位或
最大的位或Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 104 Accepted Submission(s): 62Problem DescriptionB君和G君聊天的时候想到了如下的问题。给定原创 2016-11-05 21:18:01 · 1762 阅读 · 0 评论 -
HDU 5980 icpc 大连
Find Small ATime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 766 Accepted Submission(s): 250Problem DescriptionAs is known to原创 2016-11-07 12:58:49 · 607 阅读 · 0 评论 -
1034: [ZJOI2008]泡泡堂BNB
1034: [ZJOI2008]泡泡堂BNBTime Limit: 10 Sec Memory Limit: 162 MBSubmit: 2741 Solved: 1389[Submit][Status][Discuss]Description 第XXXX届NOI期间,为了加强各省选手之间的交流,组委会决定组织一场省际电子竞技大赛,每一个省的代表队由n名选手组成,原创 2016-11-12 16:57:48 · 261 阅读 · 0 评论 -
Codeforces Round #378 (Div. 2) A. Grasshopper And the String
A. Grasshopper And the Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day, the Grasshopper was j原创 2016-11-01 16:34:43 · 280 阅读 · 0 评论 -
Codeforces Round #378 (Div. 2) B. Parade
B. Paradetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVery soon there will be a parade of victory over a原创 2016-11-01 16:36:06 · 359 阅读 · 0 评论 -
Codeforces Round #378 (Div. 2) D. Kostya the Sculptor
D. Kostya the Sculptortime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKostya is a genial sculptor, he has原创 2016-11-01 16:41:32 · 352 阅读 · 0 评论 -
2151: 种树 不正经的贪心
2151: 种树Time Limit: 10 Sec Memory Limit: 259 MBSubmit: 752 Solved: 409[Submit][Status][Discuss]DescriptionA城市有一个巨大的圆形广场,为了绿化环境和净化空气,市政府决定沿圆形广场外圈种一圈树。园林部门得到指令后,初步规划出n个种树的位置,顺时针编号1到n。并且每个位原创 2016-11-17 16:47:18 · 389 阅读 · 0 评论 -
Codeforces Round #387 (Div. 2) D. Winter Is Coming
D. Winter Is Comingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe winter in Berland lasts n days. For原创 2016-12-19 20:43:46 · 261 阅读 · 0 评论 -
Codeforces Round #387 (Div. 2) C. Servers
C. Serverstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n servers in a laboratory, each of the原创 2016-12-19 21:28:20 · 262 阅读 · 0 评论 -
Codeforces Round #392 (Div. 2) C. Unfair Poll
C. Unfair Polltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn the Literature lesson Sergei noticed an aw原创 2017-01-20 13:04:17 · 217 阅读 · 0 评论 -
广东工业大学程序设计竞赛决赛 A
Problem A: 两只老虎Description来,我们先来放松下,听听儿歌,一起“唱”。两只老虎两只老虎,跑得快跑得快。一只没有耳朵,一只没有尾巴。真奇怪,真奇怪。Tmk也觉得很奇怪,因为在他面前突然出现了一群这样的老虎,有的没耳朵,有的没尾巴,不过也有正常的。现在Tmk告诉你这群老虎的耳朵个数,尾巴条数,以及老虎的腿的原创 2017-03-27 19:15:02 · 539 阅读 · 0 评论 -
广东工业大学程序设计竞赛决赛 D
Problem D: 只有通过毁灭才能揭示真理Description“只有通过毁灭才能揭示真理。” —— 虚空之眼维克兹是一个有触手的虚空来客,他带着非凡的意图探索着符文之地:吸收掉所有知识。凭借着他不断地注视,维克兹可以发射瓦解光线来灭除并分析他途中的一切东西,并为他供给数量庞大的信息。没人知道他为什么需要如此多的材料,尽管有人推测他设法了解符文之地,是为原创 2017-03-27 19:34:17 · 354 阅读 · 0 评论 -
广东工业大学程序设计竞赛决赛 E
Problem E: 倒水(Water)Description一天,CC买了N个容量可以认为是无限大的瓶子,开始时每个瓶子里有1升水。接着~~CC发现瓶子实在太多了,于是他决定保留不超过K个瓶子。每次他选择两个当前含水量相同的瓶子,把一个瓶子的水全部倒进另一个里,然后把空瓶丢弃。(不能丢弃有水的瓶子)显然在某些情况下CC无法达到目标,比如N=3,K=1。此时原创 2017-03-27 19:36:30 · 701 阅读 · 0 评论 -
CodeForces 352A
A - Jeff and DigitsTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 352ADescriptionJeff's got n cards, each card conta原创 2017-03-27 19:40:09 · 417 阅读 · 0 评论 -
HDU 1871 无题 贪心
无题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 74 Accepted Submission(s): 54 Problem Description就要复试了,外地的考原创 2016-10-12 11:02:15 · 579 阅读 · 0 评论 -
SDAU课程练习1015
Problem DescriptionThe cows have purchased a yogurt factory that makes world-famousYucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, theprice of milk and labor will fluctuate weekly such that原创 2016-03-21 14:06:51 · 263 阅读 · 0 评论 -
SDAU课程练习1010
Problem DescriptionThe local toy store sells small fingerpainting kits withbetween three and twelve 50ml bottles of paint, each a differentcolor. The paints are bright and fun to work with, and ha原创 2016-03-21 14:07:03 · 242 阅读 · 0 评论 -
SDAU 课程练习 1016
Problem DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as原创 2016-03-16 12:28:14 · 263 阅读 · 0 评论 -
贪心专题总结
导语:“第一题谁用贪心算法AC的,我怎么wa?”----我们一起刷大白。那么刷完这套题了,什么叫贪心算法呢?正文:定义什么的我就不再赘述,简单说一下我对贪心的理解吧。贪心是一种思想,他不仅仅是 按照某种规则排序,然后一重 for 循环,按照某种标准找出最优解 这个套路。包含的还应该有更多。原创 2016-03-19 11:14:57 · 493 阅读 · 0 评论 -
SDAU课程练习1014
problem DescriptionBefore bridges were common, ferries were used to transport carsacross rivers. River ferries, unlike their larger cousins, run on aguide line and are powered by the river's curre原创 2016-03-21 14:06:53 · 257 阅读 · 0 评论 -
SDAU课程练习1013
Problem DescriptionAccounting for Computer Machinists (ACM) has sufferred fromthe Y2K bug and lost some vital data for preparing annual reportfor MS Inc.All what they remember is that MS Inc. post原创 2016-03-21 14:06:56 · 260 阅读 · 0 评论 -
SDAU课程练习1012
Problem DescriptionCurrent work in cryptography involves (among other things)large prime numbers and computing powers of numbers among theseprimes. Work in this area has resulted in the practical u原创 2016-03-21 14:06:58 · 302 阅读 · 0 评论 -
SDAU课程练习1011
Problem DescriptionAssume the coasting is an infinite straight line. Land is inone side of coasting, sea in the other. Each small island is apoint locating in the sea side. And any radar installati原创 2016-03-21 14:07:00 · 236 阅读 · 0 评论 -
SDAU课程练习1008
Problem DescriptionThere is a pile of n wooden sticks. The length and weight ofeach stick are known in advance. The sticks are to be processed bya woodworking machine in one by one fashion. It need原创 2016-03-21 14:07:08 · 232 阅读 · 0 评论 -
SDAU课程练习1007
Problem DescriptionA relay is a race for two or more teamsof runners. Each member of a team runs one section of the race.Your task is to help to evaluate the results of a relay race.You have to p原创 2016-03-21 14:07:11 · 276 阅读 · 0 评论 -
SDAU课程练习1006
Problem DescriptionThe highest building in our city hasonly one elevator. A request list is made up with N positivenumbers. The numbers denote at which floors the elevator will stop,in specified o原创 2016-03-21 14:07:13 · 232 阅读 · 0 评论 -
SDAU课程练习1005
Problem Description"Yakexi, this is the best age!" Dong MWworks hard and get high pay, he has many 1 Jiao and 5 Jiaobanknotes(纸币), some day he went to a bank and changes part of hismoney into 1 Yu原创 2016-03-21 14:07:15 · 667 阅读 · 0 评论 -
SDAU课程练习1002
Problem DescriptionHere is a famous story in Chinesehistory."That was about 2300 years ago. General Tian Ji was a high officialin the country Qi. He likes to play horse racing with the king ando原创 2016-03-21 14:07:23 · 1428 阅读 · 0 评论 -
SDAU课程练习1001
Problem DescriptionThere is a pile of n wooden sticks. The length and weight ofeach stick are known in advance. The sticks are to be processed bya woodworking machine in one by one fashion. It need原创 2016-03-21 14:07:25 · 1384 阅读 · 0 评论 -
SDAU课程练习1000
Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented afloor of a building whose shape is in the following figure.The floor has 200 rooms each on the north side and sou原创 2016-03-21 14:07:28 · 219 阅读 · 0 评论 -
SDAU课程练习1003
Problem DescriptionAn entropy encoder is a data encoding method that achieveslossless data compression by encoding a message with "wasted" or"extra" information removed. In other words, entropy en原创 2016-03-21 14:07:20 · 1392 阅读 · 0 评论 -
SDAU课程练习1009
Problem DescriptionAn entropy encoder is a data encodingmethod that achieves lossless data compression by encoding amessage with "wasted" or "extra" information removed. In otherwords, entropy en原创 2016-03-21 14:07:06 · 341 阅读 · 0 评论 -
CodeForces 352B
B - Jeff and PeriodsTime Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 352BDescriptionOne day Jeff got hold of an intege原创 2017-03-27 19:42:53 · 338 阅读 · 0 评论