
贪心
life4711
这个作者很懒,什么都没留下…
展开
-
好多考试
description期末到了,一学期基本上都没上课的ACMer,们要开始预习了…每一科的考试时间也都出来了,每一科的学分也都知道,如果没预习挂掉的话可是要扣学分的…假设每预习一科需要一天的时间,自己安排复习时间,让挂掉的学分最少。 input输入数据有多组,每组三行,每行有多个整数,其中第一个整数为数字N(1<=N<=1000) (不要问我为什么考这么多),第二行有N个整数数原创 2014-01-28 23:02:41 · 1391 阅读 · 0 评论 -
hdu4313 贪心并查集 || 树形dp
http://acm.hdu.edu.cn/showproblem.php?pid=4313Problem DescriptionMachines have once again attacked the kingdom of Xions. The kingdom of Xions has N cities and N-1 bidirectional roads. The ro原创 2015-01-25 11:43:38 · 1307 阅读 · 0 评论 -
hdu4268 multiset应用 贪心
http://acm.hdu.edu.cn/showproblem.php?pid=4268Problem DescriptionAlice and Bob's game never ends. Today, they introduce a new game. In this game, both of them have N different rectangular ca原创 2015-03-21 11:00:21 · 1112 阅读 · 0 评论 -
hdu4415 贪心
http://acm.hdu.edu.cn/showproblem.php?pid=4415Problem DescriptionEzio Auditore is a great master as an assassin. Now he has prowled in the enemies’ base successfully. He finds that the only原创 2015-04-04 20:11:16 · 1122 阅读 · 0 评论 -
hdu 4442 贪心
http://acm.hdu.edu.cn/showproblem.php?pid=4442Problem DescriptionWANGPENG is a freshman. He is requested to have a physical examination when entering the university.Now WANGPENG arrives at原创 2015-04-07 11:00:14 · 884 阅读 · 0 评论 -
poj 2456 最小值最大化
http://poj.org/problem?id=2456DescriptionFarmer John has built a new long barn, with N (2 His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once原创 2015-04-13 08:34:01 · 1561 阅读 · 0 评论 -
UVA LA 7146 2014上海亚洲赛(贪心)
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=648&problem=5158&mosmsg=Submission+received+with+ID+1708713/**UVA LA 7146 2014上海亚洲赛(贪心)题目大原创 2015-06-09 10:29:22 · 832 阅读 · 0 评论 -
CF3B 贪心
http://codeforces.com/problemset/problem/3/BA group of tourists is going to kayak and catamaran tour. A rented lorry has arrived to the boat depot to take kayaks and catamarans to th原创 2015-07-09 21:34:15 · 961 阅读 · 0 评论 -
CF555B 贪心
http://codeforces.com/problemset/problem/555/BB. Case of Fugitivetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard o原创 2015-07-12 09:43:01 · 898 阅读 · 0 评论 -
hdu5353||2015多校联合第六场1001 贪心
http://acm.hdu.edu.cn/showproblem.php?pid=5353Problem DescriptionThere are n soda sitting around a round table. soda are numbered from 1 to n and i-th soda is adjacent to (i+1)-th原创 2015-08-07 16:25:39 · 941 阅读 · 0 评论 -
hdu5360||多校联合第6场1008 贪心
http://acm.hdu.edu.cn/showproblem.php?pid=5360Problem DescriptionThere are n soda conveniently labeled by 1,2,…,n. beta, their best friends, wants to invite some soda to go hiking. The i原创 2015-08-07 17:25:25 · 787 阅读 · 0 评论 -
hdu5379||2015多校联合第7场1011 树形统计
http://acm.hdu.edu.cn/showproblem.php?pid=5379Problem DescriptionLittle sun is an artist. Today he is playing mahjong alone. He suddenly feels that the tree in the yard doesn't look good. So原创 2015-08-12 10:41:42 · 802 阅读 · 0 评论 -
hdu5289||2015多校联合第一场1002贪心+RMQ
http://acm.hdu.edu.cn/showproblem.php?pid=5289Problem DescriptionTom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has原创 2015-07-21 21:06:42 · 1649 阅读 · 5 评论 -
HDU5385 图、贪心
http://acm.hdu.edu.cn/showproblem.php?pid=5385Problem DescriptionYou have a connected directed graph.Let d(x) be the length of the shortest path from 1 to x.Specially d(1)=0.A graph原创 2015-08-15 14:36:19 · 868 阅读 · 0 评论 -
hdu5380 贪心+双端队列
http://acm.hdu.edu.cn/showproblem.php?pid=5380Problem DescriptionThere are n+1 cities on a line. They are labeled from city 0 to city n. Mph has to start his travel from city 0, passing city原创 2015-08-18 09:40:47 · 1412 阅读 · 0 评论 -
ZOJ3908 贪心
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5635The bored Bob is playing a number game. In the beginning, there are n numbers. For each turn, Bob will take out two numbers from the原创 2015-10-14 10:32:57 · 873 阅读 · 0 评论 -
CF18D 高精度+贪心
http://codeforces.com/problemset/problem/18/DLast year Bob earned by selling memory sticks. During each of n days of his work one of the two following events took place:A customer came t原创 2015-01-04 17:04:12 · 1023 阅读 · 0 评论 -
Uva 714 最大值最小化 (贪心+二分)
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=655Before the invention of book-printing, it was very hard to make a copy of a book. All the contents原创 2014-02-23 11:43:11 · 934 阅读 · 0 评论 -
木棍 nefuoj613
点击打开链接description有N个木棍,长度和宽度已知。现在要一个接一个的拼接木棍。当然我们需要计算总共拼接的时间。有以下规则:对于第一根处理的木棍,我们需要1分钟。之后处理的木棍,如果说他的长度l和宽度w满足l0<=l并且w0<=w,那么我们不需要额外再花费时间去拼接。比如,对于(9,4),(2,5),(1,2),(5,3),(4,1)这5原创 2014-02-07 12:50:15 · 1088 阅读 · 0 评论 -
NEFU OJ 205 最小树(一)
http://acm.nefu.edu.cn/JudgeOnline/contestlist.php?contest_id=120description某省长调查交通情况,发现本省交通事故发生不断,于是决定在本省内全部修建地铁。该省长得到的统计表中列出了任意两市之间的距离,为了确保任何两个市都可以直接或者间接实现地铁交通,并要求铺设的地铁总长度最小,原创 2014-02-11 17:30:40 · 1240 阅读 · 0 评论 -
山东理工大学 OJ 2074 区间覆盖问题
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2074题目描述 用i来表示x坐标轴上坐标为[i-1,i]的长度为1的区间,并给出n(1≤M≤200)个不同的整数,表示n个这样的区间。现在要求画m条线段覆盖住所有的区间,条件是:每条线段可以任意长,但是要求所画线段的长度之和最小原创 2014-02-20 20:12:41 · 1885 阅读 · 0 评论 -
poj 2376 最小区间覆盖问题
http://poj.org/problem?id=2376DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on c原创 2014-02-21 16:01:13 · 4286 阅读 · 0 评论 -
POJ 1328 区间选点问题
http://poj.org/problem?id=1328DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea s原创 2014-02-21 18:10:30 · 939 阅读 · 0 评论 -
贪心 删数问题
给定n位正整数a,去掉其中任意k≤n 个数字后,剩下的数字按原次序排列组成一个新的正整数。对于给定的n位正整数a 和正整数k,设计一个算法找出剩下数字组成的新数最小的删数方案。算法的原理应该是说从最高位开始,一次向低位搜索,一旦遇到前一位(高位)的数大于当前位,则删去前一位,直到删除k个数,如果到达末尾还没有删除k个,则说明现在这个数已经是从小到大排序了,则从最低位开始删除要求的位数。原创 2014-02-22 09:57:06 · 1355 阅读 · 0 评论 -
NEFU OJ 207 最短路径问题
http://acm.nefu.edu.cn/JudgeOnline/contestshow.php?contest_id=120&problem_id=207&num=2description有n个站,求从1站到n站的最短路线。 input输入第一行n和m, n表示有n个站,m表示有m条道路,(n原创 2014-02-11 17:46:58 · 2126 阅读 · 0 评论 -
NEFUOJ 209 湖南修路(最小树)
http://acm.nefu.edu.cn/JudgeOnline/contestshow.php?contest_id=120&problem_id=209&num=4description现得到乡村道路统计表,表中列出了任意两村间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全部畅通需要的最低成本。原创 2014-02-11 22:47:08 · 1150 阅读 · 0 评论 -
NEFUOJ 208 宫锁珠帘(最短路径问题)
http://acm.nefu.edu.cn/JudgeOnline/contestshow.php?contest_id=120&problem_id=208&num=3description新年期间湖南卫视又上映了不少宫闱大戏,晴川穿走了,又来了个宫锁珠帘的袁珊珊,袁珊珊不够美,没锁住观众的心,特别是咱们整ACM的,对这些宫闱大戏当然是不屑一顾了,可原创 2014-02-11 22:35:48 · 918 阅读 · 0 评论 -
NEFU OJ 206 最小树(二)
http://acm.nefu.edu.cn/JudgeOnline/contestshow.php?contest_id=120&problem_id=206&num=1description在森林里住了n只小熊,他们分别叫小熊A,小熊B……,小熊们决定修建水泥路让他们能更加方便的往来,使得任何一只小熊都能轻松到达其他小熊的家,同时小熊们希望修建的水泥原创 2014-02-11 17:41:30 · 1059 阅读 · 0 评论 -
POJ 1017 Packets
http://poj.org/problem?id=1017DescriptionA 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 deli原创 2014-02-13 22:56:20 · 756 阅读 · 0 评论 -
NYOJ 12 变相 最小区间覆盖问题
http://acm.nyist.net/JudgeOnline/problem.php?pid=12描述有一块草坪,横向长w,纵向长为h,在它的橫向中心线上不同位置处装有n(n<=10000)个点状的喷水装置,每个喷水装置i喷水的效果是让以它为中心半径为Ri的圆都被润湿。请在给出的喷水装置中选择尽量少的喷水装置,把整个草坪全部润湿。输入第一行输入一个正整数N表原创 2014-03-09 20:59:20 · 1339 阅读 · 0 评论 -
HDU 1257
http://acm.hdu.edu.cn/showproblem.php?pid=1257Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此原创 2014-03-09 15:28:13 · 773 阅读 · 0 评论 -
Problem - 218B - Codeforces
http://codeforces.com/problemset/problem/218/BDescriptionLolek and Bolek are about to travel abroad by plane. The local airport has a special "Choose Your Plane" offer. The offer's conditi原创 2014-03-16 14:03:39 · 1313 阅读 · 0 评论 -
2014鞍山现场赛D题 E题||hdu5073、5074
D题:http://acm.hdu.edu.cn/showproblem.php?pid=5073原创 2014-10-23 15:25:02 · 796 阅读 · 0 评论 -
hdu 4296 贪心
http://acm.hdu.edu.cn/showproblem.php?pid=4296Problem Description Have you ever heard the story of Blue.Mary, the great civil engineer? Unlike Mr. Wolowitz, Dr. Blue.Mary has accomplished m原创 2015-04-07 11:11:15 · 1954 阅读 · 2 评论