Cod sursa(job #2801209)
| Utilizator | Data | 15 noiembrie 2021 15:13:07 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.57 kb |
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map <int, bool> HASH;
int main()
{
int n, op, x;
fin >> n;
while(n--){
fin >> op >> x;
switch(op){
case 1:
HASH[x] = true;
break;
case 2:
HASH[x] = false;
break;
case 3:
fout << HASH[x] << "\n";
break;
default:
break;
}
}
return 0;
}
