Const n=5; m=3; var x,y:array[1..n] of real; i:integer; t:boolean; begin for i:=1 to n do read(x[i]); for i:=1 to n do if x[i]>m then y[i]:=x[i]; t:=true; while t do begin t:=false; for i:=1 to n-1 do if ((y[i]<=m) or (y[i]>y[i+1])) and (y[i+1]>m) then begin t:=true; y[i]:=y[i]+y[i+1]; y[i+1]:=y[i]-y[i+1]; y[i]:=y[i]-y[i+1] end end; for i:=1 to n do if y[i]>m then write(y[i],' ') else break; writeln; for i:=1 to n-1 do begin if y[i]<=m then break;<br>if y[i]=y[i+1] then begin if t=false then begin t:=true; write(i,' ') end; write(i+1,' ') end else t:=false end end.