Pagini recente » Cod sursa (job #488667) | Cod sursa (job #1201680) | Cod sursa (job #654745) | Cod sursa (job #1769253) | Cod sursa (job #3143746)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n,x,nr;
int main()
{
unordered_set<int> h;
fin >> n;
for(int i=1; i <= n; i++)
{
fin >> x >> nr;
if(x == 1 || x == 2)
{
if(x == 1)
{
h.insert(nr);
}
else
{
h.erase(nr);
}
}
else
{
if(h.find(nr) == h.end())
fout << 0 << '\n';
else
fout << 1 << '\n';
}
}
return 0;
}