#include <iostream> #include <map> using namespace std; int main() { string str; int a,b,c; cin>>a; map<int ,int >mapnum; for(int i=0;i<a;i++){ cin>>b>>c; mapnum[b]+=c; } for(auto it =mapnum.begin();it!=mapnum.end()...