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