![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
文章平均质量分 85
risker_2013
这个作者很懒,什么都没留下…
展开
-
hdu 1003 Max Sum
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5原创 2013-08-20 13:09:19 · 579 阅读 · 0 评论 -
URAL 1935 Tears of Drowned
1935. Tears of DrownedTime limit: 1.0 secondMemory limit: 64 MBTia Dalma: Come. What service may I do you? You know I demand payment.Jack: I brought payment. Look. An undead monkey. To原创 2014-05-26 12:40:03 · 623 阅读 · 0 评论 -
zoj 3410 Layton's Escape(贪心+优先队列)
Layton's EscapeTime Limit: 2 Seconds Memory Limit: 65536 KBProfessor Layton is a renowned archaeologist from London's Gressenheller University. He and his apprentice Luke has solved var原创 2014-05-20 21:44:34 · 751 阅读 · 0 评论 -
Codeforces Round #139 (Div. 2) B. Well-known Numbers
B. Well-known Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNumbers k-bonacci (k is integer, k原创 2014-03-27 18:16:43 · 589 阅读 · 0 评论 -
Codeforces Round #128 (Div. 2) C. Photographer
C. Photographertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera's lifelong ambition was to be a phot原创 2014-03-11 20:25:58 · 572 阅读 · 0 评论 -
hdu 1050 Moving Tables(最大区间覆盖问题)
Moving TablesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15906 Accepted Submission(s): 5470Problem Description The famous原创 2013-11-06 18:22:16 · 888 阅读 · 0 评论 -
hdu 1051 Wooden Sticks
Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9578 Accepted Submission(s): 3935Problem Description There is a原创 2013-10-29 21:05:32 · 492 阅读 · 0 评论 -
uva 10716 - Evil Straw Warts Live
Evil Straw Warts LiveA palindrome is a string of symbols that is equal to itself when reversed. Given an input string, not necessarily a palindrome, compute the number of swaps necessary to transfor原创 2013-08-16 20:26:46 · 846 阅读 · 0 评论 -
uva 993 Product of digits
Product of digits For a given non-negative integer number N , find the minimal natural Q such that the product of all digits of Q is equal N .InputThe first line of input原创 2013-08-16 20:03:34 · 637 阅读 · 0 评论 -
UVA 10382 Watering Grass(变相的最小覆盖问题)
Watering GrassInput: standard inputOutput: standard outputTime Limit: 3 secondsn sprinklers are installed in a horizontal strip of grass l meters long and w meters wide. Each sprinkler is原创 2013-08-16 19:39:56 · 727 阅读 · 0 评论 -
uva 10670 - Work Reduction
Problem C: Work ReductionPaperwork is beginning to pile up on your desk, and tensions at the workplace are starting to mount. Your boss has threatened to fire you if you don't make any progress by原创 2013-08-16 14:45:46 · 618 阅读 · 0 评论 -
UVA 10714 Ants
Problem B: AntsAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two原创 2013-08-14 18:32:24 · 502 阅读 · 0 评论 -
UVA 10020 Minimal coverage(最小覆盖问题)
Minimal coverage The ProblemGiven several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such they would completely cover the原创 2013-08-15 09:36:55 · 850 阅读 · 0 评论 -
uva 311 Packets
A factory produces products packed in square packets of the same height h and of the sizes , , , , , . These products are always delivered to customers in the square parcels of the same height原创 2013-08-12 21:02:06 · 565 阅读 · 0 评论 -
uva 10026 Shoemaker's Problem
大致题意是:有一个鞋匠,共有n个任务,第i个任务开始之前每天需要罚款s[i],求最小的罚款数。解题思路:简单的贪心问题,即时间越早,而罚款数越大则越先修。按照fine/day排序即可。可以用冒泡法,但不能用选择法排序,若用快排,需要另加一个数标记位置。 Shoemaker's Problem Shoemaker has N原创 2013-08-12 15:21:06 · 626 阅读 · 0 评论 -
hdu 4882 ZCC Loves Codefires 2014年多校联合第二场
#include#include#include#include#include#define M 100100using namespace std;struct point{ int e; int k; double s;}p[M];bool cmp(point a,point b){ return a.s<b.s;}int main原创 2014-07-31 17:49:17 · 658 阅读 · 0 评论