题解 | #使用算法#
#include <iostream>
#include <vector>
// write your code here......
#include <algorithm>
using namespace std;
bool cmp (int a, int b) { return (a > b); };
int main() {
int num;
vector<int> v;
for (int i = 0; i < 5; i++) {
cin >> num;
v.push_back(num);
}
// write your code here......
sort(v.begin(), v.end(), cmp);
for(auto key : v) {
cout << key << " ";
}
return 0;
}