Cod sursa(job #1017891)

Utilizator romykPrehari Romica romyk Data 28 octombrie 2013 16:40:59
Problema Hashuri Scor 0
Compilator c Status done
Runda Arhiva educationala Marime 0.54 kb
#include <stdio.h>
#include<stdbool.h>
#include <stdlib.h>
bool a[1700000001];
long long int i,n,j;
int op;
int main()
{
    freopen("hashuri.in","r",stdin);
    freopen("hashuri.out","w",stdout);
    scanf("%lli",&n);

    for(i=1;i<=n;i++)
    {scanf("%i %lli",&op,&j);
    switch(op){
      case 1: if(!a[j]) a[j]=true; break;
      case 2: if(a[j]) a[j]=false; break;
      case 3: if(a[j]) printf("1");else printf("0"); break;
      default: break;




    }
    }


    printf("Hello world!\n");


    return 0;
}