Pagini recente » Cod sursa (job #3273685) | Cod sursa (job #3248377) | Cod sursa (job #926277) | Cod sursa (job #1966144) | Cod sursa (job #2639658)
#include <bits/stdc++.h>
#define pb push_back
#define ll unsigned long long int
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_set <int> s;
int n;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
fin >> n;
while(n--) {
int x, y;
fin >> x >> y;
if(x==1)
s.insert(y);
else if(x==2)
s.erase(y);
else
fout << int(s.find(y) != s.end()) << "\n";
}
return 0;
}