UVa 484 - The Department of Redundancy Department

Summary
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
Keep track of a mapping of integers to their frequency. At EOF print out the result.

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

Output
3 4 1 2 2 3 5 1 -1 2

Solutions

 * Code All the Problems