Score : $600$ points
Takahashi has $N$ cards. The $i$-th of these cards has an integer $A_i$ written on it.
Takahashi will choose an integer $K$, and then repeat the following operation some number of times:
For each $K = 1,2, \ldots, N$, find the maximum number of times Takahashi can do the operation.
Input is given from Standard Input in the following format:
$N$ $A_1$ $A_2$ $\ldots$ $A_N$
Print $N$ integers. The $t$-th $(1 \le t \le N)$ of them should be the answer for the case $K=t$.
3 2 1 2
3 1 0
For $K = 1$, we can do the operation as follows:
For $K = 2$, we can do the operation as follows:
For $K = 3$, we cannot do the operation at all. Note that we cannot choose the first and third cards at the same time.
5 1 2 3 4 5
5 2 1 1 1
4 1 3 3 3
4 1 0 0