Cod sursa(job #2007144)
| Utilizator | Data | 1 august 2017 23:43:33 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 60 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#include <iostream>
#include <cstdio>
#include <map>
using namespace std;
map <int,bool> myMap;
int main()
{
freopen("hashuri.in","r",stdin);
freopen("hashuri.out","w",stdout);
int n,c,x;
cin >> n;
for(int i = 0; i < n; ++i) {
cin >> c >> x;
if(c == 1) {
myMap[x] = true;
}
else
if(c == 2) {
myMap[x] = false;
}
else {
cout << (int)myMap[x] << endl;
}
}
return 0;
}
