Cod sursa(job #2626803)

Utilizator dream3rDavid Pop dream3r Data 8 iunie 2020 13:59:08
Problema Hashuri Scor 0
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.55 kb
#include "pch.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <climits>
#include <map>
#include <queue>
using namespace std;
using ll = long long int;
fstream f("hashuri.in");
ofstream o("hashuri.out");
ll a, b, n;
map<int, int>has;


int main()
{
	f >> n;
	for (; n; n--)
	{
		f >> a >> b;
		if (a == 1)
		{
			has[b] = 1;
			continue;
		}
		if (a == 2)
		{
			has[b] = 0;
			continue;
		}
		if (a == 3)
		{
			if (has[b] == 1)
			{
				o<< "1\n";
			}
			else
			{
				o << "0\n";
			}
		}
	}



}