Pagini recente » Cod sursa (job #337537) | Cod sursa (job #404557) | Cod sursa (job #1855352) | Cod sursa (job #1801175) | Cod sursa (job #2574038)
#pragma GCC optimize("Ofast")
/*
/\__/\
( • - •)
/ >🍪
why hack me, better eat a cookie
*/
#include<bits/stdc++.h>
#define Plan_B() cout<<"HESOYAM"
#define all(s) s.begin(),s.end()
#define rc(x) return cout<<x,0
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
typedef long long ll;
const ll nmax=2e5+3;
const ll mod=998244353;
const ll inf=2e9+3;
using namespace std;
#define DEBUG
int main()
{
#ifdef DEBUG
freopen("hashuri.in","r",stdin);
freopen("hashuri.out","w",stdout);
#endif
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
int t;
cin>>t;
set<int>s;
while(t--)
{
int k,x;
cin>>k>>x;
if(k==1) s.insert(x);
if(k==2) s.erase(x);
if(k==3) cout<<(s.find(x)!=s.end())<<"\n";
}
}