Maps-STL

  • + 0 comments

    map map1; string x; int n,k,y; cin>>n; while(n--){ cin>>k; if(k==1){ cin>>x; cin>>y; if(map1.count(x)==1){ y+=map1[x]; map1[x]=y; }else{
    map1[x]=y; } } else if(k==2){ cin>>x; map1[x]=0; } else if(k==3){ cin>>x; cout<