Cod sursa(job #279651)
| Utilizator | Data | 12 martie 2009 21:52:11 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 30 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.41 kb |
#include <stdio.h>
long int D[1000000];
int main()
{
freopen("hashuri.in", "r", stdin);
freopen("hashuri.out", "w", stdout);
int n, o, i;
long int x;
scanf("%d", &n);
for (i=1; i<=n; i++)
{
scanf("%d %ld", &o, &x);
switch (o)
{
case 1: D[x] = 1; break;
case 2: D[x] = 0; break;
case 3: printf("%ld\n", D[x]);
}
}
fclose(stdout);
fclose(stdin);
return 0;
}
