Pagini recente » Cod sursa (job #1283223) | Cod sursa (job #542354) | Cod sursa (job #1696790) | Cod sursa (job #2221889) | Cod sursa (job #1901519)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int N;
unordered_set <int> hashed;
int main() {
fin >> N;
while (N--) {
int type, number;
fin >> type >> number;
if (type == 1) hashed.insert(number);
if (type == 2) hashed.erase(number);
if (type == 3) fout << (hashed.count(number)) << '\n';
}
fin.close();
fout.close();
return 0;
}