#include <iostream>
using namespace std;
int main(){
int N;
cin>>N;
int* student =new int[N];
for(int i=0; i<N; i++){
cin>>student[i];
}
cout<<"\n";
for(int i=0; i<N; i++){
int count = 0;
for(int j=0; j<i; j++){
if(student[j]>= student[i]){
count++;
}
}
cout<<count<<"\n";
}
delete[] student;
cin>>N;
return 0;
}
Comments
Leave a comment