#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int a[n], b[n];
for(int i = 0; i < n; i++) {
cin >> a[i];
int m = 0;
for(int j = 0; j < i; j++) {
if(a[j] < a[i]) {
m++;
}
}
b[i] = m;
cout<< b[i] << " ";
}
}
// 64 位输出请用 printf("%lld")



京公网安备 11010502036488号