![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
Yi_Qing_Z
这个作者很懒,什么都没留下…
展开
-
CodeForces - 1027C(贪心)
You have nn sticks of the given lengths.Your task is to choose exactly four of them in such a way that they can form a rectangle. No sticks can be cut to pieces, each side of the rectangle must be f...原创 2018-10-13 21:27:17 · 250 阅读 · 0 评论 -
Burrito King(贪心+结构体排序)
2014-2015 ACM-ICPC Northeastern European Regional Contest (NEERC 14)题意理解每种 Burrito有最大重量,每点一千克Albert会增加ai点开心,Barney会增加bi点不开心。最终,Albert的开心值必须大于等于A,Batney的不开心值必须小于等于B。如果有结果,就要输出最终的开心值和不开心值,以及每种...原创 2018-12-03 21:04:26 · 323 阅读 · 0 评论 -
HDU 5360 Hiking (贪心+优先队列)
算法,思路来自:https://blog.csdn.net/zip_fan/article/details/47340287(这篇博客的代码有小错误)定义结构体(数组):左端,右端,原来的位置(答案所求)对于每个样例清空队列清空放答案的数组读入左端,读入右端,对结构体数组按照左端较小在前进行排序用cnt,和答案数组,存已经邀请的人用i存当前扫到的结构体位置循环:队列不为空时...转载 2019-02-13 11:39:03 · 115 阅读 · 0 评论 -
Codeforces 558C Amr and Chemistry(暴力+贪心)
题面Amr loves Chemistry, and specially doing experiments. He is preparing for a new interesting experiment.Amr has n different types of chemicals. Each chemical i has an initial volume of ai liters....原创 2019-02-18 21:37:32 · 305 阅读 · 0 评论 -
ZeptoLab Code Rush 2015/Codeforces 526C Om Nom and Candies(贪心+思维)
题面A sweet little monster Om Nom loves candies very much. One day he found himself in a rather tricky situation that required him to think a bit in order to enjoy candies the most. Would you succeed ...原创 2019-02-20 13:24:15 · 240 阅读 · 0 评论 -
Codefroces 527D Clique Problem(贪心)
题面The clique problem is one of the most well-known NP-complete problems. Under some simplification it can be formulated as follows. Consider an undirected graph G. It is required to find a subset of...转载 2019-02-20 14:43:04 · 149 阅读 · 0 评论