
贪心
Mik0u
这个作者很懒,什么都没留下…
展开
-
最大区间重叠.
贪心问题 做贪心时,题目给出多个区间,要求找出多少区间重叠,一般可以转化成数组,在区间内,数组所指的位置加1,例如区间(a,b),那么就给(s[a], s[b])区间内的数组元素加1,然后最后寻找数组最大值,即为区间重叠的个数。 典型问题 NYOJ 168 房间安排,HDOJ 1050 Move tables 房间安排 时间限制:3000 ms | 内存限制:65535原创 2015-07-18 09:59:08 · 2159 阅读 · 0 评论 -
HDU1052 田忌赛马
Problem Description Here is a famous story in Chinese history. "That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king原创 2015-07-17 21:18:32 · 712 阅读 · 0 评论