Cod sursa(job #3203805)

Utilizator G3K0Airinei Gabriel Vlad G3K0 Data 14 februarie 2024 18:04:51
Problema Hashuri Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.41 kb
#include <bits/stdc++.h>

using namespace std;
#define int long long
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int nr;
int32_t main()
{ unordered_map <int , int > mp;
int n ,i,x;
f>>n;
for(int j=1;j<=n;j++)
{
    f>>i>>x;
    if(i==1 && mp.find(x)==mp.end())
    mp[x]=++nr;
    if(i==2)
        mp.erase(x);
    if(i==3)
      g<<(mp.find(x)!=mp.end())<<'\n';


}
    return 0;
}