cpp
#include<iostream>
using namespace std;
int main() {
int n;
int s[100] = { 0 };
cin >> n;
for (int i = 0; i < n; i++) {
cin >> s[i];
}
for (int i = 0; i < n; i++) {
int c = 0;
for (int j = 0; j < i; j++) {
if (s[i]>s[j]) {
c++;
}
}
cout << c << " ";
}
return 0;
}