#include<iostream>
#include<algorithm>
using namespace std;
long long m,n,hx,hy;
const int N = 30;
long long cnt=0;
int a[N][N];
void dfs(int x,int y)//xy代表现在的位置
{
if(x>n||y>m) return ;
if(x==n&&y==m)
{
cnt++;
return ;
}
//向右走
if(a[x][y+1]==0){
a[x][y+1]=1;
dfs(x,y+1);
a[x][y+1]=0;
}
//向下走
if(a[x+1][y]==0){
a[x+1][y]=1;
dfs(x+1,y);
a[x+1][y]=0;
}
}
int main ()
{
cin >> m >> n >> hx >> hy;
a[hx][hy]=2;
a[hx+2][hy+1]=2;a[hx+1][hy+2]=2;a[hx-1][hy+2]=2;a[hx-2][hy+1]=2;
a[hx-2][hy-1]=2;a[hx-1][hy-2]=2;a[hx+1][hy-2]=2;a[hx+2][hy-1]=2;
dfs(0,0);
cout << cnt;
return 0;
}
`````