UVa 11462 - Age Sort

11462 - Age Sort

 * http://icpcres.ecs.baylor.edu/onlinejudge/external/114/11462.html

Summary
We have $$n$$ numbers (from 1 to 100) that represent certain ages, now we need to sort this ages, but in the problem statement say that the size of the input it's ~25Mb, pretty big!.

Explanation
Instead of normally put the ages in a vector of size $$n$$, and apply a sort algorithm, one can store the times that appear a number in a vector of size 101 and print the solution based in how many times appeared the numbers from 1 to 100. For the second test case, we have: [1] = 1 [2] = 2 [3] = 3 [4] = 0 [5] = 0 . . . [100]=0

Input
5 3 4 2 1 5 5 2 3 2 3 1 0

Output
1 2 3 4 5 1 2 2 3 3