Pagini recente » Cod sursa (job #631199) | Cod sursa (job #227273) | Borderou de evaluare (job #1952680) | Cod sursa (job #2491360) | Cod sursa (job #276829)
Cod sursa(job #276829)
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.