#include <algorithm> #include <vector> typedef pair<int,int> PII; vector<PII> nums; sort(nums.begin(), nums.end());