AtCoder Beginner Contest 143
F
Distinct Numbers
AtCoder
⌀ 2277
原题
← E→
翻译中…

Problem Statement

翻译中…

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:

翻译中…
  • Choose exactly $K$ cards such that the integers written on them are all different, and eat those cards. (The eaten cards disappear.)
翻译中…

For each $K = 1,2, \ldots, N$, find the maximum number of times Takahashi can do the operation.

翻译中…

Constraints

翻译中…
  • $1 \le N \le 3 \times 10^5$
  • $1 \le A_i \le N$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N
A_1 A_2 \ldots A_N

翻译中…

Output

翻译中…

Print $N$ integers. The $t$-th $(1 \le t \le N)$ of them should be the answer for the case $K=t$.

翻译中…

样例

Input #1
3
2 1 2
Output #1
3
1
0
For $K = 1$, we can do the operation as follows: - Choose the first card to eat. - Choose the second card to eat. - Choose the third card to eat. For $K = 2$, we can do the operation as follows: - Choose the first and second cards to eat. For $K = 3$, we cannot do the operation at all. Note that we cannot choose the first and third cards at the same time.
Input #2
5
1 2 3 4 5
Output #2
5
2
1
1
1
Input #3
4
1 3 3 3
Output #3
4
1
0
0
题目信息
题号
abc143_f
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。