Pagini recente » Cod sursa (job #1247997) | Cod sursa (job #2798073) | Cod sursa (job #1333679) | Cod sursa (job #549818) | Cod sursa (job #2356596)
#include <bits/stdc++.h>
using namespace std;
int N, tip, x;
unordered_set<int> h;
int main(){
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
scanf("%d", &N);
for(int i = 0; i < N; i++){
scanf("%d%d", &tip, &x);
if(tip==1)
h.insert(x);
else if(tip==2)
h.erase(x);
else h.find(x) == h.end() ? printf("0\n") : printf("1\n");
}
return 0;
}