#include <iostream> #include <map> #include <vector> using namespace std; int main() { int n; while (cin >> n) { // 注意 while 处理多个 case map<int, int> arr; //有序 for (int i = 0; i < n; i++) { int k, v; cin>>k>>v; if(!arr.count(k)){ //用count则只需一次查找即可判断是否存在某个键...