program a; var a:array[1..5,1..4]of real;i,j:integer;s:real; begin assign(f,legacy.in); reseat(f); readln(f,n,m); close(f); k:=0; for i:=1 to n do for j:=1 to n do if a[i,j+1]>a[i,j] then begin a[i,j]:=a[i,j+1]; k:=a[i,j] end; for i:=1 to n do for j:=1 to n do if (a[i,j+1]>a[i,j])and(a[i,j+1]