#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N,M; cin>>N>>M; if(N==1){ cout<<"0\n"; return 0; } vector>A(N,vector(M)); for(int i=0;i>A[i][j]; } vectord1(M),d2(M); for(int i=0;i