Cod sursa(job #2721316)
Utilizator | Data | 11 martie 2021 18:29:00 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.39 kb |
#include <iostream>
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int q;
unordered_map <int, bool> M;
int main()
{
fin >> q;
while(q--)
{ int type, x;
fin >> type >> x;
if(type == 1)
M[x] = 1;
else if(type == 2)
M[x] = 0;
else
fout << M[x] << '\n';
}
return 0;
}