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 Attended
Status
Done
Rule
IOI
Problem
6
Start at
2026-4-2 14:15
End at
2026-4-2 17:15
Duration
3 hour(s)
Host
Partic.
62