可持久化动态图上树状数组维护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 round 493 div2 B.Cutting
There are a lot of things which could be cut — trees, paper, "the rope". In this problem you are going to cut …
Codeforces-1008B B. Turn the Rectangles
There are n rectangles in a row. You can either turn each rectangle by 90 degrees or leave it as it is. If you…