Cod sursa(job #1835410)
Utilizator | Data | 26 decembrie 2016 19:58:19 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.48 kb |
#include <iostream>
#include <map>
typedef long long ll;
using namespace std;
map<ll, int> M;
int N;
int main(){
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
int op;
ll x;
scanf("%d", &N);
for(int i=0; i<N;i++){
scanf("%d %lld", &op, &x);
if(op == 1)
M[x] = 1;
else
if(op == 2)
M[x] = 0;
else
printf("%d\n", M[x]);
}
return 0;
}