
贪心
文章平均质量分 77
小坏蛋_千千
im0qianqian_站在回忆的河边看着摇晃的渡船终年无声地摆渡,它们就这样安静地画下黄昏画下清晨......
展开
-
POJ 3617:Best Cow Line
给定长度为N的字符串S,构造一个长度为N的字符串T,并且每次只能对S的首尾字符进行操作,目标是使得构造出的T的字典序尽可能小。还算简单的贪心问题吧!只要确定好贪心策略,就没有什么问题啦~原创 2016-07-22 16:14:43 · 553 阅读 · 0 评论 -
ZOJ 3987 Numbers (贪心)
Description DreamGrid has a nonnegative integer nn. He would like to divide nn into mm nonnegative integers a1,a2,…,ama_1, a_2, \dots, a_m and minimizes their bitwise or (i.e. n=a1+a2+⋯+amn=a_1 + a_2原创 2017-11-02 14:54:02 · 1174 阅读 · 0 评论 -
Codeforces 867 E. Buy Low Sell High (贪心)
Description You can perfectly predict the price of a certain stock for the next N days. You would like to profit on this knowledge, but only want to transact one share of stock per day. That is, each原创 2017-10-01 11:48:06 · 2332 阅读 · 0 评论 -
HDU 6047 Maximum Sequence (贪心)
Description Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too easy for s原创 2017-07-28 18:16:12 · 606 阅读 · 0 评论 -
Codeforces 839 B. Game of the Rows (贪心)
Description Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. Sh原创 2017-08-13 09:03:03 · 432 阅读 · 0 评论 -
HDU 6034 Balala Power! (贪心)
Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged from a to z into each numbe原创 2017-07-26 10:54:43 · 425 阅读 · 0 评论 -
SDUT 3923 打字 (贪心)
Problem Description snow 是个热爱打字的家伙,每次敲出更快的速度都会让他很开心。现在,他拿到一篇新的打字文章,已知这篇文章只有 26 个小写英文字母,给出 snow 打出这 26 个英文字母分别需要多少时间 (s),问 snow 打完这篇文章获得的 kpm(打正确的字数/所花的分钟数)最大为多少? 注意 snow 可能会打错一些字哦。打错的必定是文章里面存在的。原创 2017-06-05 12:52:46 · 642 阅读 · 0 评论 -
山东省第八届 ACM 省赛 company (贪心、水)
Problem Description There are n kinds of goods in the company, with each of them has a inventory of cnti and direct unit benefit vali. Now you find due to price changes, for any goods sold on day i,原创 2017-05-09 19:51:11 · 1375 阅读 · 0 评论 -
山东省第八届 ACM 省赛 CF (01背包、水)
Problem Description LYD loves codeforces since there are many Russian contests. In an contest lasting for T minutes there are n problems, and for the ith problem you can get ai−di∗ti points, where ai原创 2017-05-09 19:30:19 · 1520 阅读 · 0 评论 -
Codeforces 794 C. Naming Company (贪心)
Description Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but they are having trouble finding a name f原创 2017-05-13 21:05:43 · 3263 阅读 · 0 评论 -
POJ 1328 Radar Installation (贪心)
Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, loc原创 2017-02-17 18:32:14 · 383 阅读 · 0 评论 -
SDUT 2408:Pick apples
Pick applesTime Limit: 1000MS Memory limit: 165536K题目描述Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a原创 2016-04-30 21:25:39 · 560 阅读 · 0 评论 -
Codeforces 890 C. Petya and Catacombs (贪心)
Description A very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through the catacombs. Catacombs consist o原创 2017-11-17 12:07:04 · 944 阅读 · 0 评论