#include using namespace std; using ll = long long; template using Pa = pair; template using vec = vector; template using vvec = vector>; int main(){ cin.tie(0); ios::sync_with_stdio(false); int N,M; cin >> N >> M; vvec A(N,vec(M)); vec S(M); for(int i=0;i> A[i][j]; S[j] += A[i][j]; } vec B(N); for(int i=0;i()); ll ans = 0; for(int i=0;i