![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
文章平均质量分 78
keepcoral
这个作者很懒,什么都没留下…
展开
-
scau17243 Huzi酱和他的俄罗斯套娃(贪心)
17243 Huzi酱和他的俄罗斯套娃时间限制:500MS 内存限制:65535K提交次数:15 通过次数:4 收入:22 题型: 编程题 语言: G++;GCCDescription Huzi酱是个非常贪玩的人,除了魔方他还喜欢各种各样的玩具,所以他的"吕鹏友"为了哄他高兴,每次都要带上新的玩具去见他,这次"吕鹏友"带来的玩具是俄罗斯套娃,就是一种来自俄罗斯的 很出名的玩具,外面看上去有...原创 2018-03-26 18:34:32 · 301 阅读 · 0 评论 -
uva10148相交区间插入m个点,求插入最少的点
【原题】The Department of Recreation has decided that it must be more profitable, and it wants to sell advertising space along a popular jogging path at a local park. They have built a number of billboard...原创 2018-03-27 00:16:59 · 212 阅读 · 0 评论 -
Codeforces 913D - Too Easy Problems(贪心+优先队列)
You are preparing for an exam on scheduling theory. The exam will last for exactly T milliseconds and will consist of n problems. You can either solve problem i in exactly ti milliseconds or ignore i...原创 2018-04-02 13:32:38 · 204 阅读 · 0 评论 -
初入算法篇(贪心)区间选点+uvalive2519
算法书上区间选点的问题,是一个很基础的贪心算法:给定n个区间,要求每个区间至少有一个点,那么所选点数最少为多少?依照题目的意思,这些区间肯定是有相交的部分,那么区间问题先按照左端点或者右端点排序,这里为了方便,利用左端点由大到小排序,当下一个区间的左端点在上一区间的右端点左边的时候,即有公共部分,那么直接选取上一个区间的右端点为所选点,另外,如果整下一个区间都在上一个区间内(区间包含的情况),即x...原创 2018-03-28 00:42:51 · 141 阅读 · 0 评论 -
初入算法篇(贪心) 最多不相交区间问题HDU2037+FOJ1230
今年暑假不ACTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 69292 Accepted Submission(s): 37237Problem Description “今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,...原创 2018-03-28 07:39:52 · 513 阅读 · 0 评论 -
poj1700过河问题(贪心)
Crossing RiverTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10871 Accepted: 4097DescriptionA group of N people wishes to go across a river with only one boat, which can at most carry two p...原创 2018-04-23 11:16:20 · 2673 阅读 · 1 评论 -
51nod---1432 独木舟贪心
1432 独木舟 n个人,已知每个人体重。独木舟承重固定,每只独木舟最多坐两个人,可以坐一个人或者两个人。显然要求总重量不超过独木舟承重,假设每个人体重也不超过独木舟承重,问最少需要几只独木舟? 输入: 第一行包含两个正整数n (n<=10000)和m (m<=2000000000),表示人数和独木舟的承重。 接下来n行,每行一个正整数,表示每个人的体重。体重不超过1000000000...原创 2018-04-23 13:40:07 · 140 阅读 · 0 评论 -
poj 1456 Supermarket 单纯贪心||贪心+优先队列||贪心+并查集
A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the...原创 2018-04-13 21:14:59 · 219 阅读 · 0 评论