Cod sursa(job #2581688)
| Utilizator | Data | 15 martie 2020 17:14:22 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.44 kb |
#include <bits/stdc++.h>
const int inf=2e9;
const int nmax=1e5;
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);cin.tie(0);cerr.tie(0);cout.tie(0);
freopen("hashuri.in","r",stdin);
freopen("hashuri.out","w",stdout);
int t;
cin>>t;
set<int>s;
while(t--)
{
int k,x;
cin>>k>>x;
if(k==1) s.insert(x); else
if(k==2) s.erase(x); else
cout<<(s.find(x)!=s.end())<<"\n";
}
}
