Pagini recente » Cod sursa (job #1204961) | Cod sursa (job #1515970) | Cod sursa (job #823368) | Cod sursa (job #1475726) | 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;
}