#Z15114. 直方图
直方图
Description
Given a non-negative integer array, count the occurrences of each number. We only count up to the largest number in the array.
Assume Fmax (Fmax < 10000) is the largest number in the array, then we only count the occurrences of each number in {0, 1, 2, ..., Fmax}.
Input Format
The first line contains n, the size of the array. (1 ≤ n ≤ 10000).
The next line contains the n elements of the array.
Output Format
Output the occurrence count of each number in order, one number per line. If a number has not appeared, output 0.
For the example array, the largest number is 3, so we only count the frequencies of {0, 1, 2, 3}.
5
1 1 2 3 1
0
3
1
1