Cod sursa(job #2689579)

Utilizator gruhtenZinnenberg Gruhten gruhten Data 21 decembrie 2020 14:10:58
Problema Hashuri Scor 70
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.38 kb
#include <bits/stdc++.h>
using namespace std;
int N,x,t;
map<int,bool> M;
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ifstream cin("hashuri.in");
	ofstream cout("hashuri.out");
	cin >> N;
	//M.reserve(N);
	while(N--){
		cin >> t >> x;
		if(t == 1)
            M[x]=1;
		else if(t == 2)
            M[x]=0;
		else
            cout << M[x] << '\n';
	}
}