#include<cstdio> #include<iostream> #include<cstring> #include<string> #include<algorithm> usingnamespacestd; int migong[10][10]; int n,m, fx, fy, dx, dy; int total; int barraier; bool vis[10][10]; int dir[][2] = { {0,1},{1,0},{0,-1},{-1,0} }; voiddfs(int x, int y,int step){ if (dx == x && dy == y) { total++; return; } for (int i = 0; i < 4; i++) { int nx = x + dir[i][0]; int ny = y + dir[i][1]; if (vis[nx][ny] == 0 && nx >= 1 && ny >= 1 && x <= n && y <= m) { vis[nx][ny] = 1; dfs(nx, ny, step + 1); vis[nx][ny] = 0; } } } intmain(){ cin >> n >> m >> barraier; cin >> fx >> fy >> dx >> dy; for (int i = 1; i <= barraier; i++) { int tx, ty; cin >> tx >> ty; vis[tx][ty] = 1;