|
||||||||||
MAX Average ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13258 Accepted Submission(s): 2195 Problem Description 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. Input 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]. Output For every test case, output one single line contains a real number, which is mentioned in the description, accurate to 0.01. Sample Input
Sample Output
Source | ||||||||||
|