Pagini recente » Cod sursa (job #2752732) | Cod sursa (job #53503) | Cod sursa (job #2121884) | Cod sursa (job #1343789) | Cod sursa (job #1342393)
// hashuri
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n;
unordered_map<int, bool> mp;
void read() {
f>>n;
for (int i=1;i<=n;i++) {
int type; f>>type;
int x; f>>x;
if (type == 1) {
mp[x] = 1;
} else if (type == 2) {
mp[x] = 0;
} else if (type == 3) {
g<<mp[x]<<'\n';
}
}
}
int main() {
read();
f.close(); g.close();
return 0;
}