Cod sursa(job #715965)

Utilizator alexalbu95Albu Alexandru alexalbu95 Data 18 martie 2012 00:04:27
Problema Hashuri Scor 70
Compilator cpp Status done
Runda Arhiva educationala Marime 0.33 kb
#include <fstream>
#include <map>

using namespace std;

ifstream f("hashuri.in");
ofstream g("hashuri.out");

int n, i, y, x;
map <int, int> a;

int main()
{
	for(f>>n; n; --n)
	{
	    f>>y>>x;

		if (y == 1) a[x]=1;
		if (y == 2) a.erase(x);
		if (y == 3) g << ( a.find(x)!=a.end() ) << "\n";
	}

	return 0;
}