I have a set<int, pair<int, int> > ms
that I want to sort it by greater int
and smaller pair<int, int>
. For example, if these are the data in my set:
<10, pair<100, 120> >
<20, pair<45, 60> >
<20, pair<50, 10> >
I want it to be this after sorting operation:
<20, pair<45, 60> >
<20, pair<50, 10>
<10, pair<100, 120> >
I know I can insert in set in descending order by std::greater but I don't know how to combine descending and ascending!