#1187
Unrated
PROSJEK
시간 제한
1s
메모리 제한
64MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

1 second, 64 MB, 140 points 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 · 105) and K (1 ⩽K ⩽N). The second line of input contains N integers ai (1 ⩽ai ⩽106).

출력

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.

예제 입력 1

4 1
1 2 3 4

예제 출력 1

4.000000

예제 입력 2

4 2
2 4 3 4

예제 출력 2

3.666666

예제 입력 3

6 3
7 1 2 1 3 6

예제 출력 3

3.333333
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.