Cod sursa(job #2720033)
Utilizator | Data | 10 martie 2021 15:34:56 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.49 kb |
#include <cstdio>
#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{
printf("%d\n", m[x]);
}
}
return 0;
}