Cod sursa(job #2745671)

Utilizator GhiuzanuEdward Ghiuzan Ghiuzanu Data 26 aprilie 2021 21:21:58
Problema Hashuri Scor 20
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.41 kb
#include <iostream>
#include <fstream>
using namespace std;

ifstream fin ("hashuri.in");
ofstream fout ("hashuri.out");

int n, y;
long long x;

int main(){
    long long *v;
    v = new long long;
    fin>>n;
    for (int i = 0; i < n; ++i) {
        fin>>y>>x;
        if (y == 1)
            v[x] = 1;
        else if (y == 2)
            v[x] = 0;
        else
            fout<<v[x]<<endl;
    }
    return 0;
}