Program z1; Var a: array [1..1000] of integer; b: array [1..1000] of integer; i,j,n,min,m:integer;Begin write('Введите размер массива - '); readln(n); randomize; for i:=1 to n do begin a[i]:=random(50)-0; write (a[i],' '); end; j:=1; for i:=2 to n-1 do begin if ((a[i]>a[i-1]) and (a[i]>a[i+1])) then begin b[j]:=a[i]; j:=j+1; end; end; m:=j-1; writeln; for j:=1 to m do write (b[j],' '); min:=b[1]; for j:=2 to m do if (b[j]<min) then min:=b[j]; writeln; writeln(min); End.