摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1578 【题解】 由于连续买相当于每天买,第二天卖,然后再买。所以每天最后钱尽量多一定是最优的。 所以对于m天,每天做一次O(n*70w)的完全背包dp即可。 # include <stdio. 阅读全文
posted @ 2017-06-09 22:27
Galaxies
阅读(260)
评论(0)
推荐(0)
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1577 【题解】 我们把每坨奶牛按s排个序。 对于每坨奶牛,如果车上有空位置就塞。 否则,看下车上是否有奶牛的e值比他大,就把这个奶牛扔下去(当做没上过车),把新的奶牛拉上来(因为更大的区间显然 阅读全文
posted @ 2017-06-09 17:31
Galaxies
阅读(225)
评论(0)
推荐(0)
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1574 【题解】 贪心把report的点的旁边所有点破坏即可。 # include <stdio.h> # include <string.h> # include <iostream> # i 阅读全文
posted @ 2017-06-09 16:23
Galaxies
阅读(250)
评论(0)
推荐(0)
摘要:
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1575 【题解】 动态规划,令f[i,j]表示前i个选了j个,且第i个必选的最小值。 转移就枚举上一个,再暴力算贡献即可。 复杂度O(n^4) # include <stdio.h> # inc 阅读全文
posted @ 2017-06-09 16:09
Galaxies
阅读(175)
评论(0)
推荐(1)

浙公网安备 33010602011771号