{"problem":{"name":"Distinct Numbers","description":{"content":"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 ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc143_f"},"statements":[{"statement_type":"Markdown","content":"Takahashi has $N$ cards. The $i$\\-th of these cards has an integer $A_i$ written on it.\nTakahashi will choose an integer $K$, and then repeat the following operation some number of times:\n\n*   Choose exactly $K$ cards such that the integers written on them are all different, and eat those cards. (The eaten cards disappear.)\n\nFor each $K = 1,2, \\ldots, N$, find the maximum number of times Takahashi can do the operation.\n\n## Constraints\n\n*   $1 \\le N \\le 3 \\times 10^5$\n*   $1 \\le A_i \\le N$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\ldots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc143_f","tags":[],"sample_group":[["3\n2 1 2","3\n1\n0\n\nFor $K = 1$, we can do the operation as follows:\n\n*   Choose the first card to eat.\n*   Choose the second card to eat.\n*   Choose the third card to eat.\n\nFor $K = 2$, we can do the operation as follows:\n\n*   Choose the first and second cards to eat.\n\nFor $K = 3$, we cannot do the operation at all. Note that we cannot choose the first and third cards at the same time."],["5\n1 2 3 4 5","5\n2\n1\n1\n1"],["4\n1 3 3 3","4\n1\n0\n0"]],"created_at":"2026-03-03 11:01:14"}}