Cod sursa(job #2416533)

Utilizator andreisontea01Andrei Sontea andreisontea01 Data 27 aprilie 2019 17:59:04
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.39 kb
#include <bits/stdc++.h>

using namespace std;

map<int, bool> hes;

int main()
{
    ifstream fin("hashuri.in");
    ofstream fout("hashuri.out");
    int n;
    fin >> n;
    for(int i = 1; i <= n; ++i){
        int op, x;
        fin >> op >> x;
        if(op == 1) hes[x] = 1;
        else if(op == 2) hes[x] = 0;
        else fout << hes[x] << "\n";
    }
    return 0;
}