program B; var f:text; n,k,i,j:longint; d:array[1..100000] of int64; min:int64; procedure Sort; var ind,j,i:longint; byf:int64; begin for i:=1 to n-1 do begin ind:=i; for j:=i+1 to n do if d[j]>d[ind] then ind:=j; byf:=d[ind]; d[ind]:=d[i]; d[i]:=byf; end; end; {____________________________} begin assign(f,'holy.in'); reset(f); readln(f,n,k); for i:=1 to n do read(f,d[i]); close(f); assign(f,'holy.out'); Sort; for i:=1 to n do write(d[i],' '); readln; min:=10000000000; for i:=1 to n-k do for j:=i+k-1 to n do if d[i]-d[j]