Cod sursa(job #1927690)

Utilizator AkrielAkriel Akriel Data 15 martie 2017 13:33:39
Problema Hashuri Scor 70
Compilator cpp Status done
Runda Arhiva educationala Marime 0.4 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
set<int> S;
int t,x,op;
int main()
{
    f>>t;
    for(;t;t--)
    {
        f>>op>>x;
        if(op==1)
            S.insert(x);
        else
            if(op==2)
                S.erase(x);
                else
                    g<<(S.find(x)!=S.end())<<'\n';
    }
    return 0;
}