#C7872. Frequency Count of Integers
Frequency Count of Integers
Frequency Count of Integers
You are given a list of N integers. Your task is to compute the frequency of every integer in the range \(1\) to \(\max(elements)\). Specifically, for each integer \(i\) where \(1 \leq i \leq \max(elements)\), output its frequency in the input list. If an integer does not appear in the input list, its frequency is 0.
The frequency function can be mathematically described as follows:
[ f(i) = \text{number of times } i \text{ appears in the list}, \quad \text{for } i = 1,2,\dots,\max(elements). ]
Read the input from stdin and print the frequencies in order (from 1 to \(\max(elements)\)) separated by a single space to stdout.
inputFormat
The first line contains an integer N representing the number of elements in the list.
The second line contains N space-separated integers representing the elements of the list.
outputFormat
Output a single line containing \(\max(elements)\) integers. The \(i\)-th integer should be the frequency of the number \(i\) in the input list. Numbers must be separated by a single space.
## sample1
1
1
</p>