Pagini recente » Cod sursa (job #2628003) | Cod sursa (job #1584669) | Cod sursa (job #1190093) | Cod sursa (job #2542860) | Cod sursa (job #2639655)
#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;
bool ok = s.find(y) == s.end();
if(x==1 and ok)
s.insert(y);
else if(x==2 and !ok)
s.erase(s.find(y));
else if(x==3)
fout << int(!ok) << "\n";
}
return 0;
}