Cod sursa(job #2890008)

Utilizator SteanfaDiaconu Stefan Steanfa Data 14 aprilie 2022 09:21:16
Problema Hashuri Scor 30
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.54 kb

#include <fstream>
#include <iostream>
#include <vector>

using namespace std;
vector<bool> v;
int main()
{
    v.resize(2000001);
    ofstream cout("hashuri.out");
    ifstream cin("hashuri.in");

    // ifstream cin("para.py");
    int n, s, kk = 0;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> s >> kk;
        if (s == 1)
        {
            v[kk] = 1;
        }
        else if (s == 2)
        {
            v[kk] = false;
        }
        else
        {
            cout << v[kk] << "\n";
        }
    }

    return 0;
}