Given a sequence of integer numbers , and an integer number , let be the maximum length of all the subsequences made up of only . That is, is the maximum number of times that appears consecutively in the sequence (or zero, if is not there). Given several , can you compute each ?
Input consists of several cases. Every case begins with , followed by , followed by a natural number , followed by different integer numbers about which you are asked.
For every case, print a line with the answers separated with spaces.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T12:05:45.976Z
© Jutge.org, 2006–2026.
https://jutge.org