#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
using namespace std;
int main(){
int m=0,n=0;
int q=0,p=0;
//int cnt=0;
//int x=0,y=0;
int h1[9]={0,-1,1,2,2,1,-1,-2,-2};
int h2[9]={0,-2,-2,-1,1,2,2,1,-1};
long long a[21][21]={0};
cin>>q>>p>>n>>m;
for(int i=0;i<=q;i++){
a[i][0]=1;
}
for(int i=0;i<=p;i++){
a[0][i]=1;
}
for(int i=1;i<=9;i++){
a[n+h1[i]][m+h2[i]]=-1;
}
for(int i=1;i<=q;i++){
for(int j=1;j<=p;j++){
if(/*i!=0&&j!=0&&*/a[i][j]>-1){
a[i][j]=a[i][j]+a[i-1][j]+a[i][j-1];
}else{
a[i][j]=0;
}
}
}
cout<<a[q][p];
return 0;
}
by 波函数又塌了 @ 2018-07-10 18:32:50
```
include <iostream>
include <cstdio>
include <string>
include <cstring>
using namespace std;
int main()
{
int m=0,n=0;
int q=0,p=0;
//int cnt=0;
//int x=0,y=0;
int h1[9]={0,-1,1,2,2,1,-1,-2,-2};
int h2[9]={0,-2,-2,-1,1,2,2,1,-1};
long long a[21][21]={0};
cin>>q>>p>>n>>m;
for(int i=0;i<=q;i++)
{ a[i][0]=1; }
for(int i=0;i<=p;i++)
{ a[0][i]=1; }
for(int i=1;i<=9;i++)
{ a[n+h1[i]][m+h2[i]]=-1; }
for(int i=1;i<=q;i++)
{
for(int j=1;j<=p;j++)
{
if(/i!=0&&j!=0&&/a[i][j]>-1)
{ a[i][j]=a[i][j]+a[i-1][j]+a[i][j-1]; }
else{ a[i][j]=0; }
}
}
cout<<a[q][p];
return 0;
}
```
排版完毕,不用谢我请叫我雷锋。
您的引用头文件前面没加#啊;
要#include<>
by Ophelia @ 2018-07-10 18:39:09
@[摩多罗隐岐奈](/space/show?uid=79011) 其实是因为``#``是markdown的关键字...
by moye到碗里来 @ 2018-07-10 18:45:04
@[moye到碗里来](/space/show?uid=52576) 好吧。。。我眼瞎
by Ophelia @ 2018-07-10 18:54:49