Cod sursa(job #2085220)
Utilizator | Data | 9 decembrie 2017 20:26:10 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <fstream>
#include <map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
int main() {
int n;
cin >> n;
map < int, bool > h;
for (int i = 1; i <= n; i ++) {
int op, x;
cin >> op >> x;
if (op == 1) {
h[x] = true;
}
else if (op == 2) {
h[x] = false;
}
else {
cout << h[x] << '\n';
}
}
}