【传送门:BZOJ1618】 简要题意: 有n个商店,要买h磅的食物 每个商店给出p[i],c[i],表示第i个商店每一次买就会使用c[i]的费用,并得到p[i]磅食物 求出买h磅或以上的最小费用 题解: DP(完全背包) 设f[i]为买i磅食物的最小费用,直接做就行了,水题 参考代码: ...
分类:
其他好文 时间:
2018-03-28 22:04:24
阅读次数:
199
A New Year party is not a New Year party without lemonade! As usual, you are expecting a lot of guests, and buying lemonade has already become a pleas ...
分类:
其他好文 时间:
2018-03-08 02:56:42
阅读次数:
275
Description "Let it Bead" company is located upstairs at 700 Cannery Row in Monterey, CA. As you can deduce from the company name, their business is b ...
分类:
其他好文 时间:
2018-03-06 18:19:49
阅读次数:
198
Ekka and his friend Dokka decided to buy a cake. They both love cakes and that's why they want to share the cake after buying it. As the name suggeste ...
分类:
其他好文 时间:
2018-03-06 17:08:07
阅读次数:
161
题目:https://www.luogu.org/problemnew/show/P2900 题目描述 Farmer John is considering buying more land for the farm and has his eye on N (1 <= N <= 50,000) a ...
分类:
其他好文 时间:
2018-02-09 22:32:50
阅读次数:
163
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction ...
分类:
其他好文 时间:
2018-01-20 22:46:21
阅读次数:
192
个人心得:10月份月赛题目,很low,就过了一道水题而且是把所有猜测都提交才过的。这段时间不知道忙什么去了, 也没怎么刷题感觉自己越来越差,还不如新来的大一学弟呢,别人起码天天刷代码到半夜,比起刚在区域赛拿银的学长们, 溜了溜了。慢慢磨练吧。 题目心得:这题意思很简单,就是用最多的硬币去负款,我比赛 ...
分类:
其他好文 时间:
2017-11-05 18:33:41
阅读次数:
160
题目描述 Bessie and the herd love chocolate so Farmer John is buying them some. The Bovine Chocolate Store features N (1 <= N <= 100,000) kinds of chocola ...
分类:
其他好文 时间:
2017-10-25 19:42:51
阅读次数:
135
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction ...
分类:
其他好文 时间:
2017-10-24 01:25:37
阅读次数:
180