## BOI 2007 P3 - Sound

View as PDF

Points: 10 (partial)
Time limit: 1.0s
Memory limit: 32M

Problem type

In digital recording, sound is described by a sequence of numbers representing the air pressure, measured at a rapid rate with a fixed time interval between successive measurements. Each value in the sequence is called a sample.

An important step in many voice-processing tasks is breaking the recorded sound into chunks of non-silence separated by silence. To avoid accidentally breaking the recording into too few or too many pieces, the silence is often defined as a sequence of samples where the difference between the lowest and the highest value does not exceed a certain threshold .

Write a program to detect silence in a given recording of samples according to the given parameter values and .

#### Input Specification

The first line of the file contains three integers: , the number of samples in the recording; , the required length of the silence; and , the maximal noise level allowed within silence.

The second line of the file contains integers for , separated by single spaces: the samples in the recording.

#### Output Specification

The file should list all values of i such that . The values should be listed in increasing order, each on a separate line.

If there is no silence in the input file, write NONE on the first and only line of the output file.

#### Sample Input

7 2 0
0 1 1 2 3 2 2

#### Sample Output

2
6