Farmer John’s farm consists of N plots of land, and
each plot contains a certain number of cow, no less than 1, and no more than
2,000.
John hopes to fence a part of the continuous field
and maximize the average number of cattle contained in each plot in the fenced
area.
The enclosed area must contain at least F plots,
where F will be given in the input.
Under given conditions, calculate the average
possible maximum value of the number of cattle contained in each plot in the
enclosed area.
The first lines inputs the integers N and F, and
separated with spaces.
In the next N lines, each line outputs an integer.
The integer output in the i+1th line represents the number of cattle contained
in the i-th slice.
Output an integer, which represents the maximum
value of the average value of the number of cattle contained in each plot of
land in the enclosed area, multiplied by 1000.
10 6
6
4
2
10
3
8
5
9
4
1
6500