#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int H,W; cin >> H >> W; vector> A(H,vector(W)); for(auto &h : A) for(auto &w : h) cin >> w; vector X(H),Y(W); for(int i=0; i