UVa 484

From Algorithmist
Jump to: navigation, search

484 - The Department of Redundancy Department[edit]

Summary[edit]

Given a arbitrarily long list of numbers output a list of numbers along with the number of times they occur. The numbers you output should be in the order they are read in.

Explanation[edit]

Keep track of a mapping of integers to their frequency. At EOF print out the result.

Input[edit]

3 1 2 2 1 3 5 3 3 2
-1
-1

Output[edit]

3 4
1 2
2 3
5 1
-1 2

Solutions[edit]

References[edit]