Type: RemoteJudge 1000ms 512MiB

平均数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给一个长度为 nn 的数列,我们需要找出该数列的一个子串,使得子串平均数最大化,并且子串长度 m\ge m

输入格式

第一行两个整数 nnmm

接下来 nn 行,每行一个整数 aia_i,表示序列第 ii 个数字。

输出格式

一个整数,表示最大平均数的 10001000 倍,如果末尾有小数,直接舍去,不要用四舍五入求整。

10 6
6
4
2
10
3
8
5
9
4
1

6500

提示

数据规模与约定

  • 对于 60%60\% 的数据,保证 mn104m\le n\le 10^4
  • 对于 100%100\% 的数据,保证 1mn1051 \leq m\le n\le 10^50ai20000\le a_i\le2000

AI辅助编程测试

Not Claimed
Status
Done
Problem
6
Open Since
2026-4-2 14:15
Deadline
2026-4-2 17:15
Extension
24 hour(s)