摘要: 题目描述 Farmer John's cows like to play coin games so FJ has invented with a new two-player coin game called Xoinc for them. Initially a stack of N (5 <= 阅读全文
posted @ 2016-12-27 23:02 keshuqi 阅读(524) 评论(0) 推荐(0) 编辑
摘要: Description Input Output Sample Input 4 -1 10 -20 2 2 3 4 Sample Output 9 HINT Solution 斜率优化动态规划 首先易得出这样的一个朴素状态转移方程 f[i]=max{f[j]+cal(sum[i]-sum[j])} 阅读全文
posted @ 2016-12-27 21:43 keshuqi 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Description 农夫John准备扩大他的农场,他正在考虑N (1 <= N <= 50,000) 块长方形的土地. 每块土地的长宽满足(1 <= 宽 <= 1,000,000; 1 <= 长 <= 1,000,000). 每块土地的价格是它的面积,但FJ可以同时购买多快土地. 这些土地的价格 阅读全文
posted @ 2016-12-27 20:41 keshuqi 阅读(225) 评论(0) 推荐(0) 编辑