Pagini recente » Cod sursa (job #3154096) | Cod sursa (job #2746154) | Cod sursa (job #1715520) | Cod sursa (job #178842) | Cod sursa (job #2619087)
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
int n, op, x;
unordered_map < int , bool > M;
int main() {
fin >> n;
M.reserve (n);
while (n --) {
fin >> op >> x;
if (op == 1) M[x] = true;
if (op == 2) M[x] = false;
if (op == 3) {
if (M[x] == true) fout << "1\n";
else fout << "0\n";
}
}
return 0;
}