又偷懒了…直接用stl的map
#include<bits/stdc++.h>
using namespace std;
map<long long,bool>mp1;
int main(){
int n;
cin>>n;
for(int i=1;i<=n;i++){
char operat;
long long x;
cin>>operat>>x;
if(operat=='I')mp1[x]=1;
else {
if(mp1[x])cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
}
}