Pagini recente » Cod sursa (job #1978741) | Cod sursa (job #2643249) | Cod sursa (job #1906671) | Cod sursa (job #3156928) | Cod sursa (job #2926496)
#include <iostream>
#include <fstream>
#include <unordered_map>
int main() {
std::ifstream input("hashuri.in");
std::ofstream output("hashuri.out");
std::unordered_map<int, bool> hash;
int n;
input >> n;
while (n--) {
int type, x;
input >> type >> x;
if (type == 1) hash[x] = true;
else if (type == 2) hash[x] = false;
else output << hash[x] << '\n';
}
return 0;
}