Cod sursa(job #241055)
Utilizator | Data | 9 ianuarie 2009 10:58:54 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include <stdio.h>
FILE *f,*g;
long n,op,x,i,a[1000001];
int main()
{
freopen("hashuri.in","r", stdin);
freopen("hashuri.out","w", stdout);
scanf("%ld", &n);
for (i=1;i<=n;i++)
{
scanf("%ld %ld", &op, &x);
if (op==1)
a[x]=1;
if (op==2)
a[x]=0;
if (op==3)
printf("%ld\n", a[x]);
}
return 0;
}