Cod sursa(job #1953009)

Utilizator teodorgTeodor G teodorg Data 4 aprilie 2017 16:17:08
Problema Hashuri Scor 30
Compilator cpp Status done
Runda Arhiva educationala Marime 0.38 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
//set<int> s;
int n,i,op,x,v[16000000];
int main()
{
    f>>n;
    for(i=1;i<=n;i++)
    {
        f>>op>>x;
        if(op==1)
            v[x]=1;
        else
            if(op==2)
                v[x]=0;
        else
            g<<v[x]<<"\n";
    }
    return 0;
}