Cod sursa(job #2514320)

Utilizator Sho10Andrei Alexandru Sho10 Data 25 decembrie 2019 13:58:46
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.81 kb
#include <bits/stdc++.h> //JuniorMonster a.k.a Sho10
#define ll long long int
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#define all(a) (a).begin(), (a).end()
#define sz size
#define f first
#define s second
#define pb push_back
#define er erase
#define in insert
#define mp make_pair
#define pi pair
#define rc(s) return cout<<s,0
#define endl '\n'
#define mod 1000000007
#define PI 3.14159265359
#define CODE_START  ios_base::sync_with_stdio();cin.tie();cout.tie();
using namespace std;
ll n,t,x;
unordered_map<ll,ll>m;
int32_t main(){
CODE_START;
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
cin>>n;
while(n--){
    cin>>t>>x;
    if(t==1){
        if(m[x]==0) m[x]=1;
        }else if(t==2){
        m[x]=0;
        }else {
        cout<<m[x]<<endl;
        }
}
}