Cod sursa(job #1564268)

Utilizator emiiMihailescu Ionut Emanuel emii Data 9 ianuarie 2016 16:38:33
Problema Hashuri Scor 100
Compilator cpp Status done
Runda Arhiva educationala Marime 0.43 kb
#include <fstream>
#include<unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int main()
{
    unordered_map <int,int> v;
    int n,x,y;
    f>>n;
    for(int i=1;i<=n;i++)
    {
        f>>x>>y;
        if(x==1)
            v[y]++;
        else
            if(x==2)
                v.erase(y);
            else
                g<<(v.find(y)!=v.end())<<'\n';
    }
    return 0;
}