Pagini recente » Cod sursa (job #3299856) | Cod sursa (job #2952431) | Cod sursa (job #3281197) | Cod sursa (job #2015132) | Cod sursa (job #1901512)
#include <bits/stdc++.h>
using namespace std;
int N;
unordered_map <int, int> hashed;
int main() {
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
fin >> N;
while (N--) {
int type, number;
fin >> type >> number;
if (type == 1 && hashed.find(number) == hashed.end()) hashed[number] = 1;
if (type == 2) hashed.erase(number);
if (type == 3) fout << (hashed.find(number) != hashed.end()) << '\n';
}
fin.close();
fout.close();
return 0;
}