#include #include using namespace std; int N,K; int D[61][61]; int x1,x2=1,y1,y2; int check(int a, int b, int c, int d,int e,int f){ int cnt = 0; if( a + b - 1 < N + 1) { for(int i=a; i d ){ e = a; d = max( cnt, d); f = c; } check( a+1, b, c, d, e, f); } else { if( c >= N ) { x1 = e; x2 = e + b - 1; y1 = f; y2 = f; return b,e,f; } check( 1, b, c+1, d, e, f); } } int main (){ cin >> N >> K; int L[K]; int score = 0; for(int i=0; i> L[i]; } for(int i=1; i<=N; i++){ for(int j=1; j<=N; j++){ char a; cin >> a; D[i][j] = a; if( a == '0') score++; } } for(int i=0; i