ох жеж . 1028. Stars
чемпУрала по программированию. 1999 г.
ха ха ха
66. Многие вещи нам непонятны не потому, что наши понятия слабы; но потому, что сии вещи не входят в круг наших понятий. (он самый ага)
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
static int getint(BufferedReader b){
try{
return Integer.parseInt(b.readLine().split(" ")[0]);
}catch (Exception e){return -1;}
}
public static void main(String[] args) {//hehe with sc tle on 11test
//Scanner sc = new Scanner(System.in);
BufferedReader b=new BufferedReader(new InputStreamReader(System.in));
int mx=1<<15,N=0/*=sc.nextInt()*/,x=0,t,su;
N=getint(b);
int[] s=new int[mx], c=new int[1<<14];
for(int i=0;i<N;i++){x=getint(b)+1;
t=x;su=0;while(t>0){
su+=s[t];
t=t&(t-1);
}
c[su]++;while(x<mx){
s[x]++;
x+=x&(x^(x-1));
}
}
for(int i=0;i<N;i++)System.out.println(c[i]);
}
}