Cod sursa(job #2763779)
| Utilizator | Data | 16 iulie 2021 18:25:03 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int, bool> Hash;
int n, x, y;
int main() {
fin >> n;
for(int i = 1; i <= n; i++) {
fin >> x >> y;
if(x == 1) {
Hash[y] = true;
} else if(x == 2) {
Hash[y] = false;
} else if(x == 3) {
fout << Hash[y] << "\n";
}
}
fin.close();
fout.close();
return 0;
}