Pagini recente » Cod sursa (job #1702148) | Cod sursa (job #1180816) | Istoria paginii runda/savedemdecesunteminstare | Cod sursa (job #202187) | Cod sursa (job #1037964)
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n, x, t;
class hash_f{
public:
long operator()(const int &k) const{
return k%666013;
}
};
unordered_map<int, int, hash_f> m;
int main()
{
f>>n;
while(n--){
f>>t>>x;
if(t==1) m[x]=1;
if(t==2) m.erase(x);
if(t==3) g<<(m.find(x)!=m.end())<<'\n';
}
return 0;
}