Cod sursa(job #3291678)

Utilizator octavurlurleteanu alexandru octavian octavurl Data 5 aprilie 2025 11:43:33
Problema Hashuri Scor 100
Compilator cpp-64 Status done
Runda cex_9 Marime 0.7 kb
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pb(x) push_back(x)
#define ins(x) insert(x)
#define mp(x,y) make_pair(x,y)
#define fast_ios ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
using namespace std;
ifstream fin ( "hashuri.in" ) ;
ofstream fout ( "hashuri.out" ) ;
unordered_map<int,bool>fr;
int main()
{
    fast_ios
    int n ;
    fin >> n ;
    for ( int i = 1 ; i <= n ; ++ i )
    {
        int op ;
        fin >> op ;
        int x;
        fin >> x;
        if ( op == 1 )
            fr[x]=1;
        else if ( op == 2 )
            fr[x]=0;
        else
            fout << fr[x] << '\n';
    }
    return 0;

}