Cod sursa(job #1042843)

Utilizator andreiiiiPopa Andrei andreiiii Data 27 noiembrie 2013 18:56:20
Problema Hashuri Scor 100
Compilator cpp Status done
Runda Arhiva educationala Marime 0.37 kb
#include <fstream>
#include <unordered_map>

using namespace std;

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

int main()
{
    unordered_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";
    }
}