Cod sursa(job #2931920)
Utilizator | Gheorghe Florin Cristi gheorghe_cristi | Data | 1 noiembrie 2022 11:09:20 |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.45 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.tie(nullptr);
ios_base::sync_with_stdio(false);
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";
}
}