Pagini recente » Cod sursa (job #2801892) | Cod sursa (job #1929396) | Cod sursa (job #1244456) | Cod sursa (job #1939716) | Cod sursa (job #2896372)
#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;
int 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;
}