#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a[1005];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++) {
int cnt = 0;
for (int j = 0; j < i; j++) {
if (a[i] > a[j]) {
cnt++;
}
}
cout << cnt << " ";
}
return 0;
}
09-26
08-24
392
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-21
1109
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-24
1197
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-21
1042
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-22