#Q13. 「一本通 1.2 例 2」Best Cow Fences
「一本通 1.2 例 2」Best Cow Fences
Description
Original source: USACO 2003 Mar. Green
Given a non-negative integer sequence of length , find a subsegment with the maximum average value, where the length is at least .
Input Format
The first line contains two integers and separated by a space;
The second line contains non-negative integers separated by spaces, representing .
Output Format
Output an integer representing times this average value. Do not round, output directly.
Sample 1
10 6
6 4 2 10 3 8 5 9 4 1
6500
Data Range and Hints
.