ll n,m,s,a[400][400],d[400];{rd(n,m);rd(a(m)[0..n-1]);d[0...n]+=sum(a[0..m](n))*a[0..][0...];sortA(n,d);s=d[0...n]-s;wt(-s);}