You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
//桶要够大
|
|
int a[100] = {0}, c;
|
|
//输入值
|
|
for (int i = 0; i < 10; i++) {
|
|
cin >> c;
|
|
a[c]++;
|
|
}
|
|
//输出值
|
|
for (int i = 99; i >= 0; i--) {
|
|
for (int j = 0; j < a[i]; ++j) {
|
|
cout << i << " ";
|
|
}
|
|
}
|
|
return 0;
|
|
}
|