Pagini recente » Cod sursa (job #1977779) | Cod sursa (job #1777679) | Cod sursa (job #1664189) | Cod sursa (job #2540137) | Cod sursa (job #3030535)
#include <bits/stdc++.h>
using ll=long long;
#define S second
#define F first
#define endl '\n'
#define spid ios_base::sync_with_stdio(false);cin.tie(NULL);
const int mod=1e9+7;
const double pi=3.14159265359;
const int maxn=200001;
using namespace std;
int n;
unordered_map<int,int> A;
int main(){
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
cin>>n;
while(n--){
int c, x;
cin>>c>>x;
if(c==1)A[x]=1;
else if(c==2)A.erase(x);
else{
if(A.count(x))cout<<1<<endl;
else cout<<0<<endl;
}
}
}