2713: 「一本通 1.2 例 2」Best Cow Fences
Memory Limit:512 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:141
Solved:51
Description
原题来自:USACO 2003 Mar. Green
给定一个长度为 $n$ 的非负整数序列 $A$,求一个平均数最大的,长度不小于 $L$ 的子段。
Input
第一行用空格分隔的两个整数 $n, L$;
第二行为 $n$ 个用空格隔开的非负整数,表示 $A_i$。
Output
输出一个整数,表示答案的 $1000$ 倍。不用四舍五入,直接输出。
Sample Input Copy
10 6
6 4 2 10 3 8 5 9 4 1
Sample Output Copy
6500
HINT
$1 \leq n \leq 10^5$,$0 \leq A_i \leq 2000$。