Cod sursa(job #2554869)
| Utilizator | Data | 23 februarie 2020 14:42:57 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#include <bits/stdc++.h>
using namespace std;
const string FILENAME = "hashuri";
ifstream fin(FILENAME + ".in");
ofstream fout(FILENAME + ".out");
int main() {
ios::sync_with_stdio(false);
int n; fin >> n;
map < int, bool > Map;
for (int i = 0; i < n; ++i) {
int op, x;
fin >> op >> x;
if (op == 1) {
Map[x] = true;
} else if (op == 2) {
Map[x] = false;
} else {
fout << Map[x] << "\n";
}
}
return 0;
}