Cod sursa(job #3318926)

Utilizator Floroiu_MariusFloroiu Marius Cristian Floroiu_Marius Data 29 octombrie 2025 19:12:07
Problema Hashuri Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.35 kb
#include <bits/stdc++.h>

using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
unordered_map<int,bool> mapa;
int n,x,op;
int main()
{
    fin>>n;
    while (n--)
    {
        fin>>op>>x;
        if (op==1) mapa[x]=1;
        else if (op==2) mapa[x]=0;
        else fout<<mapa[x]<<'\n';
    }
    return 0;
}