Pagini recente » Cod sursa (job #117013) | Cod sursa (job #1460484) | Cod sursa (job #1484026) | Borderou de evaluare (job #2694234) | Cod sursa (job #2932625)
#include <fstream>
#include <unordered_map>
using namespace std;
unordered_map<int, bool> myMap;
int main() {
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n, op, x;
f >> n;
while(n--) {
f >> op >> x;
if (op == 1) {
myMap[x] = 1;
}
else {
if (op == 2) {
myMap[x] = 0;
}
else {
g << myMap[x] << "\n";
}
}
}
f.close();
g.close();
return 0;
}