Cod sursa(job #3266293)

Utilizator ioanxhIoan Xh ioanxh Data 7 ianuarie 2025 11:48:14
Problema Hashuri Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.35 kb
#include<bits/stdc++.h>
using namespace std;
const string file="hashuri";
ifstream f(file+".in");
ofstream g(file+".out");
int n,x,op;
unordered_map<int,int>m;
int main(){
    f>>n;
    for(int i=1; i<=n; ++i){
        f>>op>>x;
        if(op==1) m[x]=1;
        else if(op==2) m.erase(x);
        else g<<m[x]<<'\n';
    }
    return 0;
}