#include "iostream" #include "map" #include <utility> #include<algorithm> #include<vector> using namespace std; map<int, int>m; typedef pair<int, int> PAIR; int cmp(const PAIR& x, const PAIR& y)//针对PAIR的比较函数 { if (x.second == y.second)return x.first < y.first; ...