Cod sursa(job #291762)

Utilizator hurrycaneBogdan Gaza hurrycane Data 30 martie 2009 12:59:16
Problema Hashuri Scor 0
Compilator cpp Status done
Runda Arhiva educationala Marime 0.42 kb
#include<fstream>
#include<iostream>
#include<map>

using namespace std;

fstream f,g;

unsigned long int n;

map<unsigned long int,unsigned long int> mancare;

int main(){
	f.open("hashuri.in",ios::in);
	g.open("hahsuri.out",ios::out);

	f>>n;
	for(unsigned long int i=1;i<=n;i++){
	 	int x;
		unsigned long int y;
		f>>x;
		f>>y;
		if(x==1) mancare[x]=1;
		if(x==2) mancare.erase(x);
		if(x==3){
			g<<mancare[x]<<endl;
		}
	}
}