本地运行正确系统不过
查看原帖
本地运行正确系统不过
1475346
ZNXINGBELL楼主2024/10/10 12:00

求求!本地数据2能过,系统上除了数据1全wa```c #include <stdio.h> int main(){ int num; static bool unable[10]={false},deter[5]={false}; scanf("%d",&num); getchar(); static char a[15][15]={'\000'},b[15][15]={'\000'}; for(int i=1;i<=num;i++){ for(int j=1;j<=num+1;j++){ scanf("%c",&a[i][j]); } } for(int m=1;m<=num;m++){ for(int n=1;n<=num+1;n++){ scanf("%c",&b[m][n]); } } for(int x=1;x<=num;x++){ for(int y=1;y<=num;y++){ if(a[x][y]!=b[y][num-x+1]){ unable[1]=true; } if(a[x][y]!=b[num-x+1][num-y+1]){ unable[2]=true; } if(a[x][y]!=b[num-y+1][x]){ unable[3]=true; } if(a[x][y]!=b[x][num-y+1]){ unable[4]=true; } if(a[x][y]!=b[num-y+1][num-(x)+1]){ deter[1]=true; } if(a[x][y]!=b[num-(x)+1][num-(num-y+1)+1]){ deter[2]=true; } if(a[x][y]!=b[num-(num-y+1)+1][x]){ deter[3]=true; } if(deter[1]==true&&deter[2]==true&&deter[3]==true){ unable[5]=true;
} if(a[x][y]!=b[x][y]){ unable[6]=true; }
} } for(int k=1;k<=6;k++){ if(unable[k]==false){ printf("%d",k); return 0; } } printf("7"); return 0; }

2024/10/10 12:00
加载中...