Cod sursa(job #3233192)

Utilizator Roman70Maruseac Roman Roman70 Data 2 iunie 2024 18:55:09
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.46 kb
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;


int main()
{   
    freopen("hashuri.in","r",stdin);
    freopen("hashuri.out","w",stdout);
   
   int n;
   cin >> n;
   map<ll,bool>pos;
   while(n--){
       int q;
       cin >> q;
       ll x;
       cin >> x;
       if(q == 1) pos[x]=1;
       if(q == 2) pos[x]=0;
       if(q == 3){
           cout<<pos[x];
           cout<<"\n";
       }
   }
    
    
    


    return 0;
}