Cod sursa(job #1042847)

Utilizator andreiiiiPopa Andrei andreiiii Data 27 noiembrie 2013 18:57:07
Problema Hashuri Scor 70
Compilator cpp Status done
Runda Arhiva educationala Marime 0.35 kb
#include <fstream>
#include <map>

using namespace std;

ifstream fin("hashuri.in");
ofstream fout("hashuri.out");

int main()
{
    map <int, int> a;
    int t, x, y;
    fin>>t;
    while(t--)
    {
        fin>>y>>x;
        if(y==1)  a[x]=1;
        else if(y==2) a.erase(x);
        else fout<<(a.find(x)!=a.end())<<"\n";
    }
}