Pagini recente » Cod sursa (job #147094) | Cod sursa (job #142732) | Diferente pentru problema/soc2 intre reviziile 10 si 9 | Cod sursa (job #3039061) | 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;
}