Cod sursa(job #276829)

Utilizator petrePajarcu Alexandru-Petrisor petre Data 11 martie 2009 12:49:38
Problema Hashuri Scor 20
Compilator fpc Status done
Runda Arhiva educationala Marime 0.41 kb
var f:array[1..20000] of byte;
op,x,i,n:longint;

begin
assign(input,'hashuri.in');
reset(input);
assign(output,'hashuri.out');
rewrite(output);

readln(n);
for i:=1 to n do
        begin
        read(op,x);
        if op=1 then f[x]:=1
        else if op=2 then f[x]:=0
        else
         if f[x]=1 then writeln(1)
                else writeln(0);
        end;
close(input);
close(output);
end.