讨论 / 帮看看过河卒这题啊
qq271989883 2011-10-17 04:08:00
点我顶贴 收藏 删除
程序如下:

#include<stdio.h>

__int64 n,m;

__int64 a[27][27]={0};

int main()

{

__int64 x1,y1,i,j;

scanf("%I64d %I64d",&n,&m);

scanf("%I64d %I64d",&x1,&y1);

a[x1-2][y1-1]=-1;

a[x1-1][y1-2]=-1;

a[x1+1][y1-2]=-1;

a[x1+2][y1-1]=-1;

a[x1+2][y1+1]=-1;

a[x1+1][y1+2]=-1;

a[x1-1][y1+2]=-1;

a[x1-2][y1+1]=-1;

a[x1][y1]=-1;

a[0][0]=1;

for(i=0;i<=n;i++)

for(j=0;j<=m;j++)

{

if(a[i][j]!=-1)

{

if(a[i-1][j]!=-1)

a[i][j]+=a[i-1][j];

if(a[i][j-1]!=-1)

a[i][j]+=a[i][j-1];

}

}

printf("%I64d",a[n][m]);

return 0;

}

测试结果1: 选手程序无输出

测试结果2: 通过本测试点|有效耗时47ms

测试结果3: 通过本测试点|有效耗时63ms

测试结果4:测试结果错误.错误结果为:56477364570

正确结果应为:2203961430

测试结果5: 通过本测试点|有效耗时47ms

测试结果6:测试结果错误.错误结果为:39217645

正确结果应为:1617

测试结果7: 通过本测试点|有效耗时62ms

测试结果8: 通过本测试点|有效耗时63ms

测试结果9:测试结果错误.错误结果为:56477364570

正确结果应为:2203961430

测试结果10: 通过本测试点|有效耗时63ms

帮我看看为什么啊,谢谢

查看更多回复
提交回复