Cod sursa(job #2833684)
| Utilizator | Data | 15 ianuarie 2022 15:06:42 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 70 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.39 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map <int, bool>v;
int x, c, n;
int main()
{
fin >> n;
for(int i=1; i<=n; i++)
{
fin >> c >> x;
if(c==1)
v[x]=1;
if(c==2)
v[x]=0;
if(c==3)
fout << v[x] << "\n";
}
return 0;
}