一眼map #include <iostream> #include <map> int main(int argc, char* argv[]){ int n; std::cin >> n; int index; int value; std::map<int, int> map; while(std::cin >> index >> value){ map[index] += value; } for(auto i : map){ ...