解题思路:
注意事项:
参考代码:
#include<stdio.h>
int main()
{
int a;
int b[100][100];
int c=0;
int d=0;
int e=0;
int f=0;
int g,h;
scanf("%d",&a);
for(int i=0;i<a;i++){
for(int j=0;j<a;j++){
scanf("%d",&b[i][j]);
}
}
for(int i=0;i<a;i++){
for(int j=0;j<a;j++){
if(b[i][j]==1) c++;
}
if(c%2==1) {
d++;
g=i;
}
c=0;
}
for(int j=0;j<a;j++){
for(int i=0;i<a;i++){
if(b[i][j]==1) e++;
}
if(e%2==1) {
f++;
h=j;
}
e=0;
}
if(d==0&&f==0) printf("OK");
else if(d==1&&f==1) printf("%d %d",g+1,h+1);
else printf("Corrupt");
}
0.0分
0 人评分
printf基础练习2 (C语言代码)浏览:3365 |
点我有惊喜!你懂得!浏览:1671 |
点我有惊喜!你懂得!浏览:1435 |
2004年秋浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:670 |
简单的a+b (C语言代码)浏览:760 |
最长单词 (C语言代码)浏览:1376 |
P1001 (C语言代码)浏览:801 |
A+B for Input-Output Practice (C语言代码)浏览:468 |
C语言程序设计教程(第三版)课后习题9.4 (C语言代码)浏览:645 |
模拟计算器 (C语言代码)浏览:2300 |