
----贪心
文章平均质量分 84
Jelly_acm
这个作者很懒,什么都没留下…
展开
-
Codeforces735B Urbanization
B. Urbanizationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLocal authorities have heard a lot about co原创 2016-12-13 11:58:56 · 477 阅读 · 0 评论 -
Codeforces777E. Hanoi Factory
E. Hanoi Factorytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputOf course you have heard the famous task ab原创 2017-05-04 18:10:33 · 363 阅读 · 0 评论 -
Codeforces805 C. Find Amir
C. Find Amirtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA few years ago Sajjad left his school and regi原创 2017-05-05 08:41:52 · 579 阅读 · 0 评论 -
PAT甲级 1125. Chain the Ropes (25)
1125. Chain the Ropes (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven some segments of rope, you are suppo原创 2017-07-03 10:56:20 · 392 阅读 · 0 评论 -
HDU5813 Elegant Construction
Elegant Construction Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)原创 2017-07-13 23:14:42 · 282 阅读 · 0 评论 -
codeforces815A Karen and Game
C. Karen and Gametime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputOn the way to school, Karen became fixate原创 2017-06-27 15:22:28 · 426 阅读 · 0 评论 -
POJ1065 Wooden Sticks
Wooden SticksTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 23594 Accepted: 10162DescriptionThere is a pile of n wooden sticks. The length and weight o原创 2017-07-17 10:43:40 · 311 阅读 · 0 评论 -
HUD5821 Ball
Ball Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)原创 2017-07-19 21:00:16 · 405 阅读 · 0 评论 -
Codeforces835B The number on the board
B. The number on the boardtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome natural number was written原创 2017-08-01 11:01:04 · 460 阅读 · 0 评论 -
HDU6047 Maximum Sequence(2017多校第2场)
Maximum SequenceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 599 Accepted Submission(s): 306Problem DescriptionSteph is ex原创 2017-07-28 09:43:42 · 518 阅读 · 0 评论 -
Codeforces777D Cloud of Hashtags
D. Cloud of Hashtagstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya is an administrator of a public原创 2017-05-04 18:06:34 · 448 阅读 · 0 评论 -
Codeforces777B Game of Credit Cards
B. Game of Credit Cardstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the fourth season Sherlock an原创 2017-05-04 17:19:23 · 337 阅读 · 0 评论 -
hdu1257 最少拦截系统(贪心)
最少拦截系统Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问原创 2016-05-19 20:28:24 · 436 阅读 · 0 评论 -
Codeforces758D Ability To Convert
D. Ability To Converttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlexander is learning how to convert n原创 2017-01-20 10:29:04 · 697 阅读 · 0 评论 -
HRBUST1315 火影忍者之~大战之后
火影忍者之~大战之后 经历了大战的木叶村现在急需重建,人手又少,所以需要尽可能多的接受外来的任务,以赚取报酬,重建村庄,假设你现在是木叶的一名高级忍者,有一大堆的任务等着你来做,但毕竟个人时间有限,所以没办法将所有的任务都做了,而只能尽可能的多。Input每组数据包括一个整数n,表示分配给你的任务总数,然后n行,每行两个整数,分别表示任务开始以及结束时间,输入到0结原创 2017-03-06 16:14:47 · 570 阅读 · 0 评论 -
从零开始学贪心算法
本文在写作过程中参考了大量资料,不能一一列举,还请见谅。贪心算法的定义:贪心算法是指在对问题求解时,总是做出在当前看来是最好的选择。也就是说,不从整体最优上加以考虑,只做出在某种意义上的局部最优解。贪心算法不是对所有问题都能得到整体最优解,关键是贪心策略的选择,选择的贪心策略必须具备无后效性,即某个状态以前的过程不会影响以后的状态,只与当前状态有关。解题的一般步骤是:1.建立数学模型来描述问转载 2017-03-10 23:20:01 · 18114 阅读 · 3 评论 -
Hdu 1009 FatMouse' Trade
FatMouse’ Trade贪心原创 2016-05-05 23:02:02 · 398 阅读 · 0 评论 -
Hdu1050 Moving Tables
Moving TablesProblem Description The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each on the north sid原创 2016-05-19 16:08:30 · 350 阅读 · 0 评论 -
Hdu1051 Wooden Sticks
Wooden SticksProblem DescriptionThere is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one原创 2017-03-11 23:30:20 · 300 阅读 · 0 评论 -
团体程序设计天梯赛L2-003 月饼
L2-003. 月饼时间限制100 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者陈越月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请原创 2017-03-22 18:17:47 · 405 阅读 · 0 评论 -
POJ3045 Cow Acrobats
Cow AcrobatsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4998 Accepted: 1892DescriptionFarmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are pl原创 2017-05-11 18:06:26 · 347 阅读 · 0 评论 -
Codeforces839B Game of the Rows
B. Game of the Rowstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDaenerys Targaryen has an army consistin原创 2017-08-13 20:54:18 · 637 阅读 · 1 评论