贪心算法
yangshuolll
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 1083 hdu1050 Moving Tables 贪心问题
Moving TablesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11544 Accepted Submission(s): 3944Problem DescriptionThe famous原创 2012-10-04 15:50:31 · 1821 阅读 · 0 评论 -
hdu 1052 Tian Ji -- The Horse Racing 贪心算法
Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11496 Accepted Submission(s): 3218Problem Description原创 2012-10-05 22:49:28 · 7756 阅读 · 0 评论 -
codeforces 282B - Painting Eggs
B. Painting Eggstime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Bitlandians are quite weird people. Th原创 2013-03-14 23:50:10 · 1672 阅读 · 4 评论 -
UVA 11729 Commando War 贪心的思想
题目链接brief introduction :Each soilder needs to complete own task seperately,in other words his task did't depend on other soilder's help.you ,as a commander,need to assign the task to each other原创 2013-04-10 23:42:13 · 935 阅读 · 0 评论 -
hdu 1050 moving tables 贪心
题目链接就是寻找那个房间前 桌子经过的次数, 桌子经过那个房间就对将房间的次数加1;然后找到从那个房间前移动的次数最多,然后乘以时间10分钟就可以了。找到最大的就行了要注意:trick 1 输入数据 若 5 3 即5号房要移到3号房,注意调换成由3号房到5号房等价trick 2 注意有 2号房移动打3号房 同时也占用了 1号房和4号房的位置这个我讲课的时候老汪也没有原创 2013-04-14 01:28:52 · 918 阅读 · 0 评论 -
hdu 1789 doing homework again 贪心
题目链接经典的贪心题目,仅对每节课的价值由大到小排序即可,依次看每堂课的时间,若此时间未被占用,标记占用了,若已占用,则时间向前移一位,若还占用,则继续移,若移到0时刻说明此任务完成不了,累加完成不了任务的价值,得出最后结果;post code:#include#include#includeusing namespace std;int a[2000];struct nod原创 2013-04-14 01:48:23 · 895 阅读 · 0 评论
分享