#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b>n>>m; ll a[n][m],s[m]={}; rep(i,n){ rep(j,m){ cin>>a[i][j]; s[j]+=a[i][j]; } } rep(i,n){ rep(j,m){ a[i][j]=a[i][j]*s[j]; } } ll v[n]={}; rep(i,n){ rep(j,m) v[i]+=a[i][j]; } sort(v, v+n);reverse(v, v+n); ll ans=0; rep(i,n) ans+=(i%2?-v[i]:v[i]); cout<