传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1578 [题解] 由于连续买相当于每天买,第二天卖,然后再买.所以每天最后钱尽量多一定是最优的. 所以对于m天,每天做一次O(n*70w)的完全背包dp即可. # include <stdio.h> # include <string.h> # include <iostream> # include <algorithm> // # include &…
洛谷 P2938 [USACO09FEB]股票市场Stock Market 洛谷传送门 JDOJ 2625: USACO 2009 Feb Gold 2.Stock Market JDOJ传送门 题目描述 Despite their innate prudence, the cows took a beating in the home mortgage market and now are trying their hand at stocks. Happily, Bessie is pres…