这是我的代码:
#include <iostream>
using namespace std;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {-1, 0, 1, 0};
int n, m, t, sx, sy, ex, ey, ox, oy;
int cntPath = 0;
int vis[10][10];
void dfs(int x = sx, int y = sy) {
if (x == ex && y == ey) {
cntPath++;
return;
}
for (int i = 0; i < 4; i++) {
int nx = x + dx[i];
int ny = y + dy[i];
if (nx >= 1 && nx <= n && ny >= 1 && ny <= m && !vis[nx][ny]) {
vis[nx][ny] = 1;
dfs(nx, ny);
vis[nx][ny] = 0;
}
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr), cout.tie(nullptr);
cin >> n >> m >> t >> sx >> sy >> ex >> ey;
for (int i = 1; i <= t; i++) {
cin >> ox >> oy;
vis[ox][oy] = 1;
}
vis[sx][sy] = 1;
dfs();
cout << cntPath << endl;
return 0;
}
这是编译器报的错:
/tmp/compiler_pge_elfb/src:47:1: 致命错误:写入 ./ccd7xB1D.s 时出错:No space left on device
47 | }
| ^
编译中断。
这个No space left on device是啥情况???