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