Pagini recente » Cod sursa (job #2500584) | Cod sursa (job #2265578) | Cod sursa (job #561125) | Cod sursa (job #2659836) | Cod sursa (job #2896368)
#include <bits/stdc++.h>
#include<iostream>
#include<fstream>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
unordered_map<int, int> hashul;
long long x,c,n,i;
int main()
{
fin>>n;
for(i=1;i<=n;i++)
{
fin>>c>>x;
if(c == 1)
hashul[x]=1;
else if(c == 2)
hashul.erase(x);
else if(c == 3)
if(hashul.find(x) != hashul.end())
fout<<1<<endl;
else
fout<<0<<endl;
}
return 0;
}