#P10450. [USACO03MAR] Best Cow Fences G
[USACO03MAR] Best Cow Fences G
Problem Description
Original problem from: USACO 2003 Mar. Green.
Given a non-negative integer sequence of length , find a subarray with the maximum average value, with length at least .
Input Format
The first line contains two integers and , separated by spaces.
The second line contains non-negative integers separated by spaces, representing .
Output Format
Output one integer, which is times this maximum average. Do not round; output it directly.
10 6
6 4 2 10 3 8 5 9 4 1
6500
Hint
Constraints: 。
Translated by ChatGPT 5