#include<iostream> #include<map> using namespace std; int main() { int n, index, value; map<int, int>m; pair<int, int> p; cin >> n; while (n--) { cin >> p.first >> p.second; if (m.find(p.first) != m.end()) { ...