Christmas raffle

After playing the Christmas raffle and not winning anything, you suspect
that the numbers are not drawn with the expected frequency. To study
this, write a program to count the number of appearences of each number,
and also to keep the most frequent number and the most frequent
two-digit ending.

Input

Input consists of several cases. Every case consists of a non empty
sequence of numbers between 0 and 10⁹ ending with −1.

Output

For every case, after each number, print the most frequent number so far
(if there is a tie, the smallest one), its number of occurrences, the
two-digit ending most frequent so far (if there is a tie, the smallest
one), and its number of occurrences. Print the endings always with two
digits. Afterwards, print an empty line, followed by all the numbers in
the input sorted in increasing order, with their number of accurrences.
Print a line with 10 dashes at the end of every case.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T11:07:11.052Z

© Jutge.org, 2006–2026.
https://jutge.org
