Files
python/LuoGu/RuMen/P1428.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

22 lines
400 B
C++

#include <bits/stdc++.h>
using namespace std;
int a[100], b[100], n;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = 0; i < n; i++)
for (int j = i; j >= 0; j--) {
if (a[j] < a[i])
b[i]++;
}
for (int i = 0; i < n; i++) {
cout << b[i] << " ";
}
return 0;
}