贪心
szszsz1997
假如编程易懂得,那么程序员就不会热情地写出注释,也不会有得到编程的快乐。
展开
-
POJ - 3253 Fence Repair(贪心,注意数据范围!!!)
Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 51042 Accepted: 16772 Description Farmer John wants to repair a small length of the fence ar原创 2017-07-27 09:05:50 · 221 阅读 · 0 评论 -
POJ - 3069 Saruman's Army (贪心)
Saruman's Army Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10942 Accepted: 5526 Description Saruman the White must lead his army along a straight p原创 2017-07-26 21:00:44 · 152 阅读 · 0 评论 -
POJ - 3617 Best Cow Line(贪心)
Best Cow Line Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 25475 Accepted: 6947 Description FJ is about to take his N (1 ≤ N ≤ 2,000) cows to the annu原创 2017-07-25 21:42:26 · 145 阅读 · 0 评论 -
UVa 11292 Dragon of Loowater(排序+贪心)
点击打开链接 题意:有n条龙,m个骑士,骑士的能力为x,可以砍x以下的头,每个骑士只能雇佣一次并且只能砍一次,费用是能力值x。求能不能消灭所有龙,并求出最小费用。 解决:将骑士和龙排序就好。 细节:。。。 #include #include using namespace std; int a[20005], b[20005];//dragon, knights int原创 2017-07-25 15:51:18 · 156 阅读 · 0 评论