对应题目:小蓝的图书馆
#include<bits/stdc++.h>
using namespace std;
map<string,int>a;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int m;
string c,n,b;
cin>>m;
while(m--){
cin>>c;
if(c=="find"){
cin>>n;
cout<<a[n]<<endl;
}else{
cin>>b>>n;
a[n]++;
}
}
return 0;
}