Pagini recente » Cod sursa (job #1885367) | Cod sursa (job #3030968) | Cod sursa (job #2292114) | Cod sursa (job #3040932) | 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;
}