
贪心
我好想逃
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
51nod 1163 最高的奖励(优先队列+贪心)
题目: 原题如下: 有N个任务,每个任务有一个最晚结束时间以及一个对应的奖励。在结束时间之前完成该任务,就可以获得对应的奖励。完成每一个任务所需的时间都是1个单位时间。有时候完成所有任务是不可能的,因为时间上可能会有冲突,这需要你来取舍。求能够获得的最高奖励。 Input 第1行:一个数N,表示任务的数量(2 <= N <= 50000) 第2 - N + 1行,每行2个数,中间用...原创 2018-10-17 19:01:56 · 260 阅读 · 0 评论 -
Uva 11729 Commando War 贪心啦
Sample Input 3 2 5 3 2 2 1 3 3 3 4 4 5 5 0 Output for Sample Input Case 1: 8 Case 2: 15 图片摘自:https://me.youkuaiyun.com/SunnyYoona 思路:贪心,什么交贪...原创 2018-12-04 22:32:31 · 217 阅读 · 0 评论 -
UVA - 10020 Minimal coverage (区间更新,贪心)
Minimal coverage The Problem Given several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such they would completely cover the segment [0,...原创 2018-11-28 12:17:32 · 208 阅读 · 0 评论 -
Uva 10382 Watering Grass(贪心区间覆盖+)
n sprinklers are installed in a horizontal strip of grass l meters long andw meters wide. Each sprinkler is installed at the horizontal center line of the strip. For each sprinkler we are given it...原创 2018-12-07 00:33:08 · 248 阅读 · 0 评论