Cod sursa(job #2676576)

Utilizator Iustin01Isciuc Iustin - Constantin Iustin01 Data 24 noiembrie 2020 16:58:12
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.42 kb
#include <bits/stdc++.h>
using namespace std;

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

unordered_map < int , bool > hashis;
int n, caz, x;

int main(){
    in>>n;
    while(n--){
        in>>caz>>x;
        if(caz == 1 && hashis.find(x) == hashis.end())
            hashis[x] = true;
        if(caz == 2)
            hashis.erase(x);
        if(caz == 3)
            out<<hashis[x]<<"\n";
    }
}