int pd (int x,int y)
{
int s;
s=a[x][y]+a[x+1][y]+a[x+2][y];
s+=a[x][y+1]+a[x+1][y+1]+a[x+2][y+1];
s+=a[x][y+2]+a[x+1][y+2]+a[x+2][y+2];
if (s==45) return 1;
return 0;
}
int main ()
{
int i,j,f,s;
for (i=1; i<=9; i++)
for (j=1; j<=9; j++)
cin>>a[i][j];
f=1;
for (i=1; i<=9; i++) {
s=0;
for (j=1; j<=9; j++)
s+=a[i][j];
if (s!=45) f=0;
s=0;
for (j=1; j<=9; j++)
s+=a[i][j];
if (s!=45) f=0;
}
for (i=1; i<=9; i+=3)
for (j=1; j<=9; j+=3)
if (!pd(i,j)) f=0;
cout<<f<<endl;
return 0;
}
状态: Unaccepted
测评机: Xeost[5]
得分: 80分
提交日期: 2008-9-6 22:06:00
有效耗时: 188毫秒
测试结果1: 测试结果错误.错误结果为:1
正确结果应为:0
测试结果2: 通过本测试点|有效耗时47:ms
测试结果3: 通过本测试点|有效耗时47:ms
测试结果4: 通过本测试点|有效耗时47:ms
测试结果5: 通过本测试点|有效耗时47:ms