Two times Unicom gate: Bzoj 1567: [Jsoi2008]blue Mary's campaign map
/*bzoj 1567: [Jsoi2008]blue Mary's Campaign Map Society I'm a man of a lot of violence can be a problem positive solution can WA0*/#include<cstdio>#include<iostream>#defineRG RegisterinlinevoidRead (int&N) {RGCharc =GetChar (); for(n =0;!isdigit (c); c =GetChar ()); for(; IsDigit (c); n = n *Ten+ C-'0', C =GetChar ());}#defineMax 60intA[max][max], B[max][max];intMain (intargcChar*argv[]) { intN Read (N); RgintI, J, K, X, Y, z, C; for(i =1; I <= N; + + i) for(j =1; J <= N; ++j) Read (A[i][j]); for(i =1; I <= N; + + i) for(j =1; J <= N; ++j) Read (B[i][j]); for(i = N; I >=1; --i) for(j =1; J <= N-i +1; ++j) for(k =1; K <= N-i +1; ++k) for(x =1; X <= n-i +1; ++x) for(y =1; Y <= n-i +1; ++y) { for(z =0; Z < i; ++z) for(c =0; c < i; ++c)if(A[j + z][k + c]! = b[x + z][y + c])GotoHere ; printf ("%d", i);return 0; Here:Continue; } printf ("0");return 0;}
Bzoj 1567: [Jsoi2008]blue Mary's campaign map