题解 | #合并表记录#
合并表记录
http://www.nowcoder.com/practice/de044e89123f4a7482bd2b214a685201
#include #include
it=m.find(key);
if(it==m.end())
{
m[key]=value;
}
else
{
m[key]+=value;
}
}
for(it=m.begin();it!=m.end();it++) { cout<first<<" "<second<<endl; } return 0; }