Pagini recente » Borderou de evaluare (job #1871988) | Cod sursa (job #2456004) | Cod sursa (job #1571593) | Cod sursa (job #1071123) | 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;
}