Cod sursa(job #568949)

Utilizator tzipleatudTudor Tiplea tzipleatud Data 31 martie 2011 20:41:11
Problema Hashuri Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.43 kb
#include <fstream>

using namespace std;

ifstream f("hash.in");
ofstream g("hash.out");

long long n,i,x;
int o;
bool fr[200000001];

int main () {
    f >> n;
    for (i=1;i<=n;i++) {
        f >> o >> x;
        if (o==1) fr[x]=true;
        if (o==2) fr[x]=false;
        if (o==3) if (fr[x]==true) g << 1 << '\n';
                         else      g << 0 << '\n';
    }
    f.close();g.close();
    return 0;
}