贪心
MrQ_zh
这个作者很懒,什么都没留下…
展开
-
codeforces 285C Building Permutation (简单贪心)
Building Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPermutationp is an ordered set of integers p1,原创 2016-11-22 11:17:27 · 473 阅读 · 0 评论 -
HDU-2037 活动安排(贪心法...)
问题:简单来说就是有个节目表有起始时间和结束时间...要你在一天内尽可能多的完整看节目...分析:典型贪心法解...这次贪得是结束时间...意思就是让这一天中剩下的时间尽可能多...所以让结束时间尽可能的早剩下就是些判断起始时间是否比看完上个节目晚就行了...用这道题练了练排序函数、结构体使用...写的比较繁琐...见谅。原创 2016-11-23 01:09:33 · 347 阅读 · 0 评论 -
POJ-3069 Saruman's Army (贪心)
Saruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman distributes seeing stones, known as palantirs, among the troops. Each pala原创 2016-12-20 11:37:31 · 219 阅读 · 0 评论 -
POJ-1854 Evil Straw Warts Live
A 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 transform the string into a pal原创 2017-04-17 22:03:26 · 377 阅读 · 0 评论