贪心
SSShigH
站在巨人的肩膀上看世界
展开
-
P1230 智力大冲浪
这题应该是贪心吧,对于每一个游戏,当然是扣钱扣得多的先玩,按照价值从大到小排序,对于当前的价值,从当前的t时段开始遍历,如果说t时段已经被占用了,看看前面的t-1是否被占用,一直到1;如果都被占用了,说明这个游戏不能进行#include <iostream> #include <algorithm> using namespace std; struct node{ ...原创 2018-03-25 22:45:04 · 461 阅读 · 0 评论 -
poj 2376 cleaning shifts
Cleaning ShiftsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 27628 Accepted: 6814DescriptionFarmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores ...原创 2018-04-06 13:09:48 · 124 阅读 · 0 评论