EasyRating 1000
Cut the Sticks
Repeatedly cut the length of the shortest stick off every stick and throw away sticks of length 0. Before each cut, print how many sticks there are.
Input
n, then n lengths.
Output
One count per line.
Sample 1
Input
6 5 4 4 2 2 8
Output
6 4 2 1
Sample 2
Input
1 3
Output
1
Output appears here