# include & lt; Stdio. H>
Int main () {
Int a, b=1, I, j, aa [7] [7], c [7];
The scanf (" % d \ n ", & amp; A);
While (a & gt; 0 {
For (j=1; J & lt;=2; J++) {
The scanf (" % s ", c);
Aa [j] [3]=c [0] - '0';
Aa [j] [1] - [4]=c '0'.
Aa [j] [5]=c [2] - '0';
}
For (j=3; J & lt;=5; J++) {
The scanf (" % s ", c);
Aa [j] [1]=c [0] - '0';
Aa [j] [1] [2]=c - '0';
Aa [j] [2] [3]=c - '0';
Aa [j] [3] [4]=c - '0';
Aa [j] [4] [5]=c - '0';
Aa [j] [5] [6]=c - '0';
Aa [j] [6] [7]=c - '0';
}
For (j=6; J & lt;=7. J++) {
The scanf (" % s ", c);
Aa [j] [3]=c [0] - '0';
Aa [j] [1] - [4]=c '0'.
Aa [j] [5]=c [2] - '0';
}
For (I=3; I & lt;=5; I++) {
For (j=1; J & lt;=2; J++) {
If (aa [I] [j]==1) {
If (aa [I] [j + 1)==1 & amp; & Aa [I] [m + 2]==0)
B=0;
If (aa + 1] [I [j]==1 & amp; & (aa + 2 [I] [j]==0 | | aa [j] [I - 1]==0))
B=0;
}
}
For (j=6; J & lt;=7. J++) {
If (aa [I] [j]==1) {
If (aa [I] [j + 1)==1 & amp; & Aa [I] [m + 2]==0)
B=0;
If (aa + 1] [I [j]==1 & amp; & (aa + 2 [I] [j]==0 | | aa [j] [I - 1]==0))
B=0;
}
}
}
For (I=1; I & lt;=7. I++) {
For (j=3; J & lt;=5; J++) {
If (aa [I] [j]==1) {
If (aa [I] [j + 1)==1 & amp; & (aa [I] [m + 2]==0 | | aa [I] [1]==0))
B=0;
If (aa + 1] [I [j]==1 & amp; & (aa + 2 [I] [j]==0 | | aa [j] [I - 1]==0))
B=0;
}
}
}
A -;
If (b==0)
Printf (" \ n ");
The else
Printf (" yes \ n ");
}
}
CodePudding user response:
Not is empty for each position to judge the direction of the up and down or so don't exist for two pieces?
CodePudding user response: