一开始的cmp函数:
cmp(...) { return a.l<b.l; }
修改后的:
bool cmp(Pair a,Pair b) { if(a.first!=b.first) return a.first<b.first; else return a.second>b.second; }