Cod sursa(job #3289172)
Utilizator | Data | 25 martie 2025 22:38:40 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.4 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int, bool> ap;
int n, op, x;
signed main()
{
fin >> n;
while(n--)
{
fin >> op >> x;
if(op == 1)
ap[x] = 1;
else if(op == 2)
ap[x] = 0;
else
fout << ap[x] << '\n';
}
return 0;
}