#include #include using namespace std; typedef long long LL; int N,M; int check(vector> &R,vector> &maxV,int k) { int i,j; int num=0; for (i=0;i<=k;i++){ for (j=0;j>N>>M; vector> R(N,vector(M)); int i,j; for (i=0;i>r; R[i][j]=r; } } vector> maxV(M,vector(N)); for (j=0;j=Max){ Max=R[i][j]; } maxV[j][i]=Max; } } cout<<1<