Cod sursa(job #3286703)

Utilizator mateistefan11matei stefan mateistefan11 Data 14 martie 2025 15:49:21
Problema Hashuri Scor 100
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.47 kb
#include <bits/stdc++.h>
using namespace std;
ifstream fin("hashuri.in");
ofstream fout("hashuri.out");
int n;
unordered_map<int,int> M;
int main()
{
    ios_base::sync_with_stdio(0);
    fin.tie(0);
    fout.tie(0);
    int task,  x;
    fin >> n;
    while(n--)
    {
        fin >> task >> x;
        if(task == 1)
            M[x] = 1;
        else if(task == 2)
            M[x] = 0;
        else
            fout << M[x] << "\n";
    }
    return 0;
}