Cod sursa(job #2720034)
Utilizator | Data | 10 martie 2021 15:38:59 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.51 kb |
#include <cstdio>
#include <iostream>
#include <unordered_map>
using namespace std;
unordered_map <int, bool> m;
int main()
{
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
int n, x, op;
scanf("%d", &n);
while(n--){
scanf("%d%d", &op, &x);
if(op == 1){
m[x] = true;
}
else if(op == 2){
m[x] = false;
}
else{
cout << m[x] << "\n";
}
}
return 0;
}