'commit'
This commit is contained in:
22
LuoGu/RuMen/P1428.cpp
Normal file
22
LuoGu/RuMen/P1428.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user