2993:MAX Average Problem

题目描述
Consider a simple sequence which only contains positive integers as a1, a2 ... an, and a number k. Define ave(i,j) as the average value of the sub sequence ai ... aj, i<=j. Let’s calculate max(ave(i,j)), 1<=i<=j-k+1<=n.
输入解释
There multiple test cases in the input, each test case contains two lines.
The first line has two integers, N and k (k<=N<=10^5).
The second line has N integers, a1, a2 ... an. All numbers are ranged in [1, 2000].
输出解释
For every test case, output one single line contains a real number, which is mentioned in the description, accurate to 0.01.
输入样例
10 6
6 4 2 10 3 8 5 9 4 1
输出样例
6.50
来自杭电HDUOJ的附加信息
Recommend chenrui

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2993

最后修改于 2020-10-25 22:59:00 UTC 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)

·

·

·

·

登陆或注册以提交代码