Cod sursa(job #3301387)
Utilizator | Data | 25 iunie 2025 15:33:28 | |
---|---|---|---|
Problema | Hashuri | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.45 kb |
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map <int,bool> f;
int q;
int main()
{
fin>>q;
while (q--)
{
int type,x;
fin>>type>>x;
if (type==1)
f[x]=1;
else
if (type==2)
f[x]=0;
else
fout<<f[x]<<'\n';
}
return 0;
}