Cod sursa(job #2745653)

Utilizator GhiuzanuEdward Ghiuzan Ghiuzanu Data 26 aprilie 2021 21:08:41
Problema Hashuri Scor 0
Compilator cpp-32 Status done
Runda Arhiva educationala Marime 0.4 kb
#include <bits/stdc++.h>
using namespace std;

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

unordered_map<int, int> hashuri;
int n, y;
long long x;

int main()
{
    fin>>n;
    for(int i = 1;i <= n;i++)
    {
        fin>>y>>x;
        if(y == 1)
            hashuri[x]=1;
        else if(y == 2)
            hashuri.erase(x);
        else
            fout<<hashuri[x];
    }
    return 0;
}