huida
view sourceprint?01.var
02.n:integer;
03.a:array[1..1000] of 0..1;
04.i,j,k,g:integer;
05.begin
06.readln(n);
07.for i:=1 to n do
08.begin
09.read(k);
10.a[k]:=1;
11.end;
12.for i:=1 to 1000 do if a[i]=1 then inc(g);
13.writeln(g);
14.for i:=1 to 1000 do if a[i]=1 then write(i,' ');
15.end.