求助如何优化,还是说这题dfs肯定要tle吗
#include<bits/stdc++.h>
using namespace std;
#define int long long
int cnt;
int fx,fy;int a,b;
bool st[100][100];
void dfs(int x,int y){
if(x==fx&&y==fy){cnt++;return;}
if(!st[x+1][y]&&x+1<=fx&&y<=fy)dfs(x+1,y);
if(!st[x][y+1]&&x<=fx&&y+1<=fy)dfs(x,y+1);
}
signed main(){
cin>>fx>>fy>>a>>b;
st[a][b]=true;
st[a+2][b+1]=true;
if(b-1>=0) st[a+2][b-1]=true;
if(a-2>=0){
st[a-2][b+1]=true;
if(b-1>=0)st[a-2][b-1]=true;
}
if(b-2>=0){
st[a+1][b-2]=true;
if(a-1>=0)st[a-1][b-2]=true;
}
if(a-1>=0)st[a-1][b+2]=true;
st[a+1][b+2]=true;
dfs(0,0);
cout<<cnt;
return 0;
}