@[Director_Ni](/user/1067789) 代码调的我想死 Q A Q
by wunaidedanjuan @ 2023-08-27 21:03:38
@[Director_Ni](/user/1067789) 微调,更改地方已标注
```cpp
#include<bits/stdc++.h>
using namespace std;
bool ma[30][30];
long long cnt[30][30];//不开 long long 见祖宗
int main(){
int n,m,x,y;
cin>>m>>n>>x>>y;
++m;++n;++x;++y;
++m;++n;++x;++y;
// for(int i=2;i<=m;++i){
// for(int j=2;j<=n;++j){
// cnt[i][j]=1;
// }
// }
ma[x-2][y+1]=1;
ma[x-2][y-1]=1;
ma[x+2][y+1]=1;
ma[x+2][y-1]=1;
ma[x-1][y+2]=1;
ma[x-1][y-2]=1;
ma[x+1][y+2]=1;
ma[x+1][y-2]=1;
ma[x][y]=1;
cnt[x-2][y+1]=0;
cnt[x-2][y-1]=0;
cnt[x+2][y+1]=0;
cnt[x+2][y-1]=0;
cnt[x-1][y+2]=0;
cnt[x-1][y-2]=0;
cnt[x+1][y+2]=0;
cnt[x+1][y-2]=0;
cnt[x][y]=0;
cnt[2][1]=1;//初始化
for(int i=2;i<=m;++i){//
for(int j=2;j<=n;++j){//从 2 开始遍历
if(!ma[i][j]){
cnt[i][j]=cnt[i-1][j]+cnt[i][j-1];
}
else{
continue;
}
}
}
cout<<cnt[m][n];
return 0;
}
```
by wunaidedanjuan @ 2023-08-27 21:06:50
@[Director_Ni](/user/1067789) [AC记录](https://www.luogu.com.cn/record/123025146)
by wunaidedanjuan @ 2023-08-27 21:07:27
@[wunaidedanjuan](/user/951032) 谢谢=_=
by Director_Ni @ 2023-08-28 07:45:56
@[wunaidedanjuan](/user/951032) 感谢,换成long long AC了
by chenbaobao @ 2023-08-28 18:53:49
谢谢,我终于发现我的问题了
by zjsdsb24 @ 2023-09-03 15:49:59
确实,没开long long我也卡在3和4
by rabbitearl @ 2023-09-07 17:22:39