Cod sursa(job #2931919)
| Utilizator | Data | 1 noiembrie 2022 11:08:37 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.39 kb |
#include <iostream>
#include <map>
#include <fstream>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n;
int op, x;
map<int, bool> fr;
int main() {
fin >> n;
while (n--) {
fin >> op >> x;
if (op == 1)
fr[x] = true;
else if (op == 2)
fr[x] = false;
else
fout << fr[x] << "\n";
}
}