Cod sursa(job #2706923)

Utilizator crismariuCrismariu Codrin crismariu Data 16 februarie 2021 09:16:41
Problema Hashuri Scor 30
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.74 kb
#include <bits/stdc++.h>
//#pragma GCC optimize("O3")
#define test " test "
#define ll long long
#define pii pair<int, int>
#define FASTIO   \
    cin.tie(0);  \
    cout.tie(0); \
    ios_base::sync_with_stdio(0);
#define FILES                      \
    freopen("hashuri.in", "r", stdin); \
    freopen("hashuri.out", "w", stdout);
#define testcase             \
    int T;    \
    cin >> T; \
    while (T--)
#define vec vector<int>
using namespace std;

int m[1000001];

signed main()
{
    FASTIO; FILES;
    testcase{
        int x, y;
        cin >> x >> y;
        if(x == 1)
            m[y] = 1;
        else if(x == 2)
            m[y] = 0;
        else
            cout << m[y] << '\n';
    }
    return 0;
}