#include<iostream>
using namespace std;
int f[10][10];
int cnt,n,m,stx,sty,enx,eny;
void dfs(int nowx,int nowy){
if(nowx<1||nowx>m)return;
if(nowy<1||nowy>n)return;
if(f[nowx][nowy]==1||f[nowx][nowy]==2)return;
if(nowx==enx&&nowy==eny)cnt++;return;
f[nowx][nowy]=1;
dfs(nowx+1,nowy);
dfs(nowx,nowy+1);
dfs(nowx-1,nowy);
dfs(nowx,nowy-1);
f[nowx][nowy]=0;
return;
}
int main(){
int t;
cin>>n>>m>>t;
cin>>stx>>sty>>enx>>eny;
for(int i=1;i<=t;i++){
int x,y;
cin>>x>>y;
f[x][y]=2;
}
dfs(stx,sty);
cout<<cnt;
return 0;
}
大佬帮忙看一看,为什么一直输出零