#include #define rep(i,n) for(int i=0;i> N >> K; vectora(N);rep(i,N)cin >> a[i]; ll ans=inf; int w=25; priority_queueq; for(int i=0;i=max(0,N-1-w);i--){ rep(j,N)q.push(abs(a[i]-a[j])); ll s=0; rep(j,N){ if(j