Cod sursa(job #2552326)

Utilizator arckerDolteanu Gabriel arcker Data 20 februarie 2020 19:21:38
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.27 kb
#include <bits/stdc++.h>
using namespace std;

int N,x,t;
unordered_map<int,bool> M;

int main(){
	ifstream cin("hashuri.in");
	ofstream cout("hashuri.out");
	cin >> N;
	while(N--){
		cin >> t >> x;
		if(t == 1) M[x]=1;else
		if(t == 2) M[x]=0;else
		cout << M[x] << '\n';
	}
}