程序哪里错了,老是30分,求大佬们帮助
#include<bits/stdc++.h>
using namespace std;
int n,m,t,sx,sy,fx,fy,mapp[7][7],total=0,mop[7][7];
int x[5]={0,0,0,1,-1};
int y[5]={0,1,-1,0,0};
//0障碍 1走过 2空
void qk()
{
for(int i=1;i<7;i++)
for(int j=1;j<7;j++)
if(mapp[i][j]==1)
mapp[i][j]=2;
}
void dfs(int k)
{
if(sx==fx&&sy==fy)
{
total++;
}
else
{
for(int i=1;i<=4;i++)
if(sx+x[i]!=0&&sx+x[i]!=n&&sy+y[i]!=0&&sy+y[i]!=m&&!mop[sx+x[i]][sy+y[i]])
{
mop[sx][sy]=true;sx=sx+x[i];sy=sy+y[i];
dfs(k+1);
sx=sx-x[i];sy=sy-y[i];mop[sx][sy]=false;
}
}
}
int main()
{
int a,b;
cin>>n>>m>>t;
cin>>sx>>sy>>fx>>fy;
for(int i=0;i<t;i++)
{
cin>>a>>b;
mapp[a][b]=0;
}
qk();
dfs(0);
cout<<total;
}