Cod sursa(job #615638)

Utilizator nashnash mit nash Data 10 octombrie 2011 14:39:28
Problema Hashuri Scor 30
Compilator cpp Status done
Runda Arhiva educationala Marime 0.47 kb


#include <cstdio>

using namespace std;

#define NMAX 100000000

char vec[ NMAX ] ;
int n, op , val;


int main() {

	freopen("hashuri.in","r",stdin);
	freopen("hashuri.out","w",stdout);

	scanf("%d",&n);

	for(int  i = 1 ; i <= n ; i++) {

		scanf("%d %d",&op,&val);

		switch( op ) {
		
		case 1:
			vec[ val ] = 1;
			break;
		case 2:
			vec[ val ] = 0;
			break;
		case 3:
			printf("%d\n",(int)vec[ val ] );
			break;
		}
	}

	return 0;
}