sort
sort(all(a) , [&](int a , int b){
return a < b;
});
bool com(auto a , auto b){
return
}
sort(all(a) , cmp) ;
优先队列
struct cmp{
bool operator() (T a , T b){
return a > b ;
}
};
priority_queue<T , vector<T> , cmp > pq ;
set
struct cmp{
bool operator() (G a , G b){
return a.r > b.r ;
}
};
set<t , cmp> se ;
unordered_map
struct has{
size_t operator()(const pair<int,int> a)const {
return a.first * 131 + a.second;
}
};
unordered_map<pii, int , has> u_mp ;