Pagini recente » Cod sursa (job #96876) | Cod sursa (job #2003135) | Istoria paginii runda/trainingtime/clasament | Istoria paginii runda/rares_pre | Cod sursa (job #1901925)
#include <bits/stdc++.h>
using namespace std;
int n;
unordered_map <int,int> hasht;
int main()
{
ifstream in ("hashuri.in");
ofstream out ("hashuri.out");
in >> n;
while (n--)
{
int op, x;
in >> op >> x;
if(op == 1)
hasht[x] = 1;
else if(op == 2)
hasht.erase(x);
else
out << (hasht.find(x) != hasht.end()) << '\n';
}
in.close();
out.close();
return 0;
}