#include using namespace std; using Int=long long; using Real=long double; templateinline bool chmin(T&A,T B){return(A>B?A=B,1:0);} templateinline bool chmax(T&A,T B){return(A>N>>M; REP(i,N)cin>>A[i]; sort(A,A+N); multisetst; auto f=[&](Int x){return x*x;}; Int mt=0; REP(i,M-1)mt+=f(A[i+1]-A[i]); Int ans=mt; for(int i=M-1;i>T; while(T--)sol(); }