Cod sursa(job #3244387)
| Utilizator | Data | 24 septembrie 2024 17:26:28 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.45 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
/**
7
1 3
1 20
2 7
3 4
3 20
2 20
3 20
a=3,20;
*/
unordered_map<int,bool> a;
int main()
{
int n,i,c,x;
fin>>n;
for(i=1;i<=n;i++)
{
fin>>c>>x;
if(c==1) a[x]=1;
else if(c==2) a[x]=0;
else if(a[x]==1) fout<<"1\n";
else fout<<"0\n";
}
return 0;
}
