![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
文章平均质量分 70
czdb
这个作者很懒,什么都没留下…
展开
-
开机 CSU - 1254
机房有很多机器,不同机器开机时间不同。已知开始站在1号机器,从一台机器走到另一台机器需要5秒,如何才能用最短的时间打开所有的机器。 Input 每组数据开头一个n表示机器数,接下来n个数表示1~n号机器所需开机时间,以秒为单位。0 Output 每组数据输出一行一个数,表示所有机器打开所需最短时间。 Sample Input 3 35 10 30 Sample原创 2016-12-17 16:11:25 · 276 阅读 · 0 评论 -
E. Buy Low Sell High(贪心+set)
E. Buy Low Sell High time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You can perfectly predict the price of a certain原创 2017-10-04 12:03:14 · 645 阅读 · 0 评论 -
Ordering Pizza(贪心)
Ordering Pizza time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It's another Start[c]up finals, and that means there is原创 2017-10-04 11:35:55 · 913 阅读 · 1 评论 -
Jury Meeting Codeforces Round #433 (Div. 2, based on Olympiad of Metropolises)(贪心,预处理?)
Jury Meeting time limit per test 1 second memory limit per test 512 megabytes input standard input output standard output Country of Metropolia is holding Olympiad of Metrpolises so原创 2017-09-08 18:31:12 · 271 阅读 · 0 评论 -
839B Game of the Rows(水,思维,贪心)
B. Game of the Rows time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Daenerys Targaryen has an army consistin原创 2017-08-13 09:08:37 · 1006 阅读 · 0 评论 -
Atcoder- Sports Festival(二分+暴力+思维+贪心)
B - Sports Festival Time limit : 2sec / Memory limit : 256MB Score : 700 points Problem Statement Takahashi is hosting an sports meet. There are N people who will participate. These pe原创 2017-07-24 11:39:36 · 465 阅读 · 0 评论 -
岛屿的数量 51Nod - 1276(思维+贪心+单调)
有N个岛连在一起形成了一个大的岛屿,如果海平面上升超过某些岛的高度时,则这个岛会被淹没。原本的大岛屿则会分为多个小岛屿,如果海平面一直上升,则所有岛都会被淹没在水下。 给出N个岛的高度。然后有Q个查询,每个查询给出一个海平面的高度H,问当海平面高度达到H时,海上共有多少个岛屿。例如: 岛屿的高度为:{2, 1, 3, 2, 3}, 查询为:{0, 1, 3, 2}。 当海面高度为0时,所有的原创 2017-06-17 15:27:50 · 358 阅读 · 0 评论 -
Codeforces 794C - Naming Company
C. Naming Company time limit per test2 secondsmemory limit per test256 megabytes inputstandard input outputstandard output Oleg the client and Igor the analyst are good friends. However, sometim原创 2017-05-18 18:44:55 · 348 阅读 · 0 评论 -
湘潭邀请赛G- Parentheses(贪心,思维)
Parentheses Bobo has a very long sequence divided into n consecutive groups. The i -th group consists of l i copies of character c i where c i is either "(" or ")". As the sequenc原创 2017-05-18 13:33:05 · 361 阅读 · 0 评论 -
csu:1922: Irony Ring
Description There are n irony ring in a factory. The i-th ring has inner radius ai, outer radius bi and height hi. The goal is to select some subset of irony ring to create as high town as possible .原创 2017-05-09 14:47:04 · 295 阅读 · 0 评论 -
1859: Gone Fishing
Description John is going on a fishing trip. He has h hours available ( 1 <= h <= 16 ), and there are n lakes in the area (2 <= n <= 25), L1 , ..., Ln, all reachable along a single, one-w原创 2017-04-03 16:25:21 · 300 阅读 · 0 评论 -
Muddy roads POJ - 2437
Farmer John has a problem: the dirt road from his farm to town has suffered in the recent rainstorms and now contains (1 Farmer John has a collection of wooden planks of length L that he can use t原创 2016-12-15 14:55:00 · 395 阅读 · 0 评论 -
Wannafly挑战赛20 B 背包(贪心)
链接:https://www.nowcoder.com/acm/contest/133/B 来源:牛客网 题目描述 Applese有1个容量为v的背包,有n个物品,每一个物品有一个价值ai,以及一个大小bi 然后他对此提出了自己的疑问,如果我不要装的物品装的价值最大,只是一定需要装m个物品,要使得求出来的物品价值的中位数最大 Applese觉得这个题依然太菜,于是他把这个问题丢给了你 ...原创 2018-07-26 22:44:53 · 303 阅读 · 0 评论