Cod sursa(job #2472447)

Utilizator RAZVAN_NISTORNistor Razvan RAZVAN_NISTOR Data 12 octombrie 2019 13:21:50
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.44 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
int n,q,x;
map <int,bool> mp;
int main()
{
    f>>n;
    for(int i=1;i<=n;i++)
    {
        f>>q>>x;
        if(q==1)
        {
            mp[x]=true;
        }
        else
            if(q==2)
        {
            mp[x]=false;
        }
        else
        {
            g<<mp[x]<<'\n';
        }
    }
    return 0;
}