Problem A
The Sound of Silence
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 m samples where the difference between the lowest
and the highest value does not exceed a certain treshold
Write a program to detect silence in a given recording of
Input
The first line of the input contains three integers:
Output
You should output a list of all values of
Sample Input 1 | Sample Output 1 |
---|---|
7 2 0 0 1 1 2 3 2 2 |
2 6 |