SP7739 BOI7SOU - Sound

题目描述

求一个序列中,长度为 $m$ 的区间最大值减最小值 $\le c$ 的区间个数。 第二行 $n$ 个整数 $a_i$,为题目中的序列。

输入格式

The first line of the file contains three integers: n (1

输出格式

输出共 $m$ 行,每行表示一段静音的起始位置,按照出现的先后顺序输出。如果没有输出 `NONE`。

说明/提示

对于 $100\%$ 的数据,保证: $$1 \le n \le 1000000$$ $$1 \le m \le 10000$$ $$0 \le c \le 10000$$ $$0 \le a_i \le 1000000$$ $$(\max{a_i, \cdots , a_i + m - 1}) - (\min{a_i, \cdots , a_i + m - 1}) \le c$$