Cod sursa(job #3289171)
Utilizator | Data | 25 martie 2025 22:36:51 | |
---|---|---|---|
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, int> ap;
signed main()
{
int n, op, x;
fin >> n;
while(n--)
{
fin >> op >> x;
if(op == 1)
ap[x] = 1;
if(op == 2)
ap[x] = 0;
if(op == 3)
fout << ap[x] << "\n";
}
return 0;
}