Cod sursa(job #2720028)
Utilizator | Data | 10 martie 2021 15:30:07 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.45 kb |
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream in ("hashuri.in");
ofstream out ("hashuri.out");
unordered_map <int, bool> m;
int main()
{
int n, op, x;
in >> n;
while(n--){
in >> op >> x;
if(op == 1){
m[x] = true;
}
else if(op == 2){
m[x] = false;
}
else{
out << m[x] << '\n';
}
}
return 0;
}