프로그램 명: coci_prosjek2(special judge)
제한시간: 1 초
You are given an array of N integers. Find a consecutive subsequence of numbers of the length at least
K that has the maximal possible average.
Please note: the average of a subsequence is the sum of all the numbers in the subsequence divided
by its length.
입력
-
The first line of input contains two integers N (1 <= N <= 3*10^5) and K (1 <= K <= N).
-
The second line of input contains N integers ai (1 <= ai <= 10^6).
출력
The first and only line of output must contain the maximal possible average. An absolute deviation
of ±0.001 from the official solution is permitted.
입출력 예
입력
4 1
1 2 3 4
출력
4.000000
입력
4 2
2 4 3 4
출력
3.666666
입력
6 3
7 1 2 1 3 6
출력
3.333333
출처:2013-2014 contest7 5/6
[질/답]
[제출 현황]
[푼 후(0)]