Pagini recente » Cod sursa (job #661471) | Cod sursa (job #694174) | Simulare 05 | Cod sursa (job #1138248) | Cod sursa (job #2574347)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n;
unordered_map <int, bool> mp;
int main() {
int op, value;
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
fin >> n;
mp.reserve(n);
while (n --) {
fin >> op >> value;
if (op == 1) {
mp[value] = 1;
} else if (op == 2) {
mp[value] = 0;
} else {
fout << mp[value] << "\n";
}
}
return 0;
}