Cod sursa(job #2884501)

Utilizator hobbitczxdumnezEU hobbitczx Data 3 aprilie 2022 20:34:00
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.57 kb
#include <bits/stdc++.h>
#define ll long long
#define INF 0x3F3F3F3F
using namespace std;

const string fisier = "hashuri";

ifstream fin (fisier + ".in");
ofstream fout (fisier + ".out");

unordered_map<int , int>m;
int n;

int main(){
    ios_base::sync_with_stdio(false);
    fin >> n;
    for (int i=1; i<=n; i++){
        int op , x; fin >> op >> x;
        if (op == 1){
            m[x] = true;
        }
        if (op == 2){
            m[x] = false;
        }
        if (op == 3){
            fout << (m[x] == true) << '\n';
        }
    }
}