loj#P3742. 「COCI 2015.3」PROSJEK
「COCI 2015.3」PROSJEK
Description
You are given an array of integers. Find a consecutive subsequence of numbers of the length at least 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.
Input
The first line of input contains two integers () and (). The second line of input contains integers ai ().
Output
The first and only line of output must contain the maximal possible average. An absolute deviation of 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
Scoring
In test cases worth of total points, it will hold that is not larger than .