Pagini recente » Cod sursa (job #3206811) | Monitorul de evaluare | Cod sursa (job #574623) | Cod sursa (job #881611) | Cod sursa (job #2745660)
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
unordered_map<int, int> h;
int n, y;
long long x;
int main(){
fin>>n;
for(int i = 0; i < n; i++)
{
fin>>y>>x;
if(y == 1)
h[x] = 1;
else if(y == 2)
h.erase(x);
else if(y == 3)
{
if(h.find(x) != h.end())
fout<<1<<endl;
else
fout<<0<<endl;
}
}
return 0;
}