Cod sursa(job #2195975)
Utilizator | Data | 17 aprilie 2018 22:06:41 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.36 kb |
#include <bits/stdc++.h>
using namespace std;
map <int,int> M;
int n;
int main(){
ifstream cin ("hashuri.in");
ofstream cout ("hashuri.out");
cin >> n;
while (n--){
int o, x;
cin >> o >> x;
if (o == 1) M[x] = 1;
else if (o == 2) M[x] = 0;
else cout << M[x] << "\n";
}
return 0;
}