欢迎访问我的个人网站==》 jiashubing.cn
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2993题目大意:给定一个长度为n(最长为10^5)的正整数序列,求出连续的最短为k的子序列平均值的最大值。Sample Input10 6 6 4 2 10 3 8 5 9 4 1Sample Output6.50分析:斜率优化DP,要认真看代码如下: 1 # include 2 # include 3 # include 4 # include 5 6 using namespace std; 7 8 const int maxn = 100010; 9 double a[maxn], sum.. 阅读全文
posted @ 2013-09-22 23:22 贾树丙 阅读(322) 评论(0) 推荐(1) 编辑