set自定义cmp排序
#include<bits/stdc++.h>
using namespace std;
#define int long long
struct cmp{
bool operator()(int a,int b){
return a>b;
}
};
set<int,cmp>myst;
set<int>oriset;
signed main()
{
int x;
while(cin>>x)
{
myst.insert(x);
oriset.insert(x);
}
set<int,cmp>::iterator it;
for(it=myst.begin();it!=myst.end();it++)cout<<*it<<" ";cout<<"\n";
set<int>::iterator itt;
for(itt=oriset.begin();itt!=oriset.end();itt++)cout<<*itt<<" ";cout<<"\n";
}