#include
int main()
{ int n,i,j,yes=1,a[30][30];
scanf("%d",&n);
for(i=0; i
for(i=0; i
printf("%s\n",yes?"Yes":"No");
return 0;
}
int main(int argc, char *argv[])
{
int i=0;
int a[3][3]={
{1,2,3},
{2,2,3},
{3,3,3}};
for(i=0;i<2;i++)
if(a[i][i+1]!=a[i+1][i])break;
if(i<2)
printf("No");
else
if(a[i-1][i]==a[i][i-1])
printf("Yes");
else
printf("No");
}
一个一个套 for关于i,j的双重循环 arry[i][j]里面的i,j互换呗