===== PascalABC.NET =====
begin
var n := ReadInteger('n =');
var a := ArrRandom(n, -99, 99);
a.Println;
var amax := a.Max;
var imin := a.IndexMin + 1;
a := a[:imin] + Arr(amax) + a[imin:];
a.Print
end.
===== PascalABC.NET =====
begin
var n := ReadInteger('n =');
var a := ArrRandom(n, -99, 99);
a.Println;
var amax := a.Max;
var imin := a.IndexMin + 1;
a := a[:imin] + Arr(amax) + a[imin:];
a.Print
end.