Cod sursa(job #2706922)

Utilizator crismariuCrismariu Codrin crismariu Data 16 februarie 2021 09:15:40
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.75 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;

signed main()
{
    FASTIO; FILES;
    unordered_map<int, int> m;
    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;
}