begin
var V := ArrRandom(ReadInteger('n='), -50, 50);
V.Println;
var k := V.Length;
k := (k.IsOdd ? (k + 1) : k) div 2;
V := (V[:k].OrderByDescending(t -> t) + V[k:]).ToArray;
end.
begin
var V := ArrRandom(ReadInteger('n='), -50, 50);
V.Println;
var k := V.Length;
k := (k.IsOdd ? (k + 1) : k) div 2;
V := (V[:k].OrderByDescending(t -> t) + V[k:]).ToArray;
V.Println;
end.
Примерn= 1327 -32 47 -45 33 28 -39 20 26 3 19 -35 547 33 28 27 -32 -39 -45 20 26 3 19 -35 5