分类:贪心
【优先队列/贪心】The Average
In a speech contest, when a contestant finishes his speech, the judges will then grade his performance. The st…
【贪心】小A与204
链接:https://ac.nowcoder.com/acm/contest/317/B 来源:牛客网 小a非常喜欢204这个数字,因为′a′+′k′=204。 现在他有一个长度为nn的序列,其中只含有2,0,4这三种数…
【思维/模拟】Reorder the Books
传送门:这里 题意:一摞书,无序,可以把某本书抽到最顶上,问最少抽几次可以使书有序。
【贪心+01背包】The Highest Mark
传送门:【HDU5501】The Highest Mark 分析:贪心+01背包 贪心求解做题顺序,动态规划求解做哪个题。
牛客练习赛29-A 可持久化动态图上树状数组维护01背包
可持久化动态图上树状数组维护01背包 请允许我吐槽一下这个劝退人的题目,实际题与题目无关。 题目: 你有一个长度为 n 序列 {a}(序列下标从1开始) ,每次可以从任意位置 i 花费 ai*i 的代价来把 ai 删除。…
Codeforces-1029A Many Equal Substrings
You are given a string t consisting of n lowercase Latin letters and an integer number k.Let's define a substr…
Codeforces-1000B B Light It Up
Recently, you bought a brand new smart lamp with programming features. At first, you set up a schedule to the …