rt,#4我WA了,input为19 19 1 0。
#include<bits/stdc++.h>
#define maxn 25
using namespace std;
typedef long long ll;
ll f[maxn][maxn];
bool vis[maxn][maxn];
const int move_x[]={0, -2, -1, 1, 2, 2, 1, -1, -2};
const int move_y[]={0, 1, 2, 2, 1, -1, -2, -2, -1};
int main(){
memset(f,0,sizeof(f));
int xb,yb,x,y;
cin>>xb>>yb>>x>>y;
xb++;yb++;x++;y++;
for(int i=0;i<=8;i++)
if(x+move_x[i]>=1 && x+move_x[i]<=maxn+1 && y+move_y[i]>=1 && y+move_y[i]<=maxn+1){
vis[y+move_y[i]][x+move_x[i]]=1;
}
if(vis[1][1]){
cout<<0;
return 0;
}
f[1][1]=1;
f[1][2]=f[2][1]=1;
for(int i=1;i<=yb;i++){
for(int j=1;j<=xb;j++){
if(i==1&&j==1 || i==1&&j==2 || i==2&&j==1) continue;
if(!vis[i][j]){
f[i][j]=f[i][j-1]+f[i-1][j];
}
}
}
// for(int i=0;i<=yb;i++){
// for(int j=0;j<=xb;j++){
// printf("%12d",f[i][j]);
// }
// cout<<'\n';
// }
printf("%lld",f[yb][xb]);
return 0;
}