Cod sursa(job #2576167)

Utilizator betybety bety bety Data 6 martie 2020 17:41:08
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.36 kb
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
unordered_map<int,bool> m;
int main()
{
    int n,op,x;
    cin>>n;
    for(int w=1;w<=n;++w)
    {
        cin>>op>>x;
        if(op==1) m[x]=1;
        else if(op==2) m[x]=0;
        else cout<<m[x]<<'\n';
    }
    return 0;
}