program Project13; {$APPTYPE CONSOLE} var a,b:array[1..100] of integer; i,k,n,min:integer; begin writeln('Vvedit kilkist elementiv v masyvi A[1..n]'); readln(n); for i:=1 to n do begin writeln('Vvedit ',i,' element masyvu A');readln(a[i]);end; b[1]:=a[1];min:=b[1];k:=1; for i:=1 to n do begin if a[i]>min then begin b[k+1]:=a[i];min:=b[k+1];k:=k+1;end;end; writeln('Kilkist K=', k); for i:=1 to k do begin write(b[i],' ');end; readln; end.