https://www.luogu.com.cn/record/76591006
#include <bits/stdc++.h>
using namespace std;
long long a[30][30];
short x[18] = {1, 2, 2, 1, -1, -2, -2, -1, 0}, y[18] = {-2, -1, 1, 2, 2, 1, -1, -2, 0};
bool g[30][30];
int main(){
int n, m;
cin >> n >> m;
int nx, ny;
cin >> nx >> ny;
for (int i = 0; i <= 8; i++){
g[nx+x[i]][ny+y[i]] = 1;
}
for (int i = 1; i <= n; i++){
for (int j = 1; j <= m; j++){
if (g[i][j] == 0){
a[i][j] = a[i-1][j]+a[i][j-1];
}else{
a[i][j] = 0;
}
a[1][1] = 1;
}
}
cout << a[n][m];
return 0;
}