Cod sursa(job #3318131)
| Utilizator | Data | 27 octombrie 2025 11:17:07 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.51 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");
int n;
unordered_map <int,int> f;
int main() {
fin >> n;
while (n--) {
int op, x;
fin >> op >> x;
if (op == 1)
f[x] = 1;
else if (op == 2)
f[x] = 0;
else {
if (f[x] == 0)
fout << "0\n";
else
fout << "1\n";
}
}
fout << "\n";
return 0;
}
