#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
class compare
{
public:
bool operator()(int a, int b)
{
return a > b;
}
};
void test01()
{
vector<int> v;
v.push_back(1);
v.push_back(2);
v.push_back(5);
v.push_back(31);
v.push_back(4);
v.push_back(2);
sort(v.begin(), v.end(), compare());
for (auto it : v)
{
cout << it << endl;
}
}
int main()
{
test01();
return 0;
}