Pagini recente » Cod sursa (job #642698) | Cod sursa (job #2137244) | Cod sursa (job #480265) | Cod sursa (job #1119984) | Cod sursa (job #2765062)
#include <fstream>
#include <iostream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int x, n, op;
unordered_map<int, int> M;
int main() {
fin >> n;
for (; n != 0; n--) {
fin >> op >> x;
if (op == 1)
M[x] = 1;
else if (op == 2)
M.erase(x);
else if (op == 3)
fout << (M.find(x) != M.end()) << '\n';
}
return 0;
}