robot motion

希望各位大佬前来指正,谢谢

#include
using namespace std;
int a = 1, b = 1, c;
int hang, start,step;
int visit[100][100];
int vis[100][100];//这个数组用来存储步数
char map[100][100];
void dfs(int m,int q) {
	hang = m; start = q;
	if (hang<1 || hang>a || start<1 || start>b) {//如果越界就执行这个步骤
		 cout << step <<" step(s) to exit"<> a >> b;
		if (a == 0 && b == 0) return 0;
		else cin >> c;
		memset(visit, 0, sizeof(visit));
		memset(vis, 0, sizeof(vis));
		step = 0;
		hang = 0; start = 0;
		for (i = 1; i <= a; i++) {
			for (j = 1; j <= b; j++) {
				cin >> map[i][j];
			}
		}
		dfs(1, c);
	}
	return 0;
}

我这个代码为什么是wrong answer,求大佬指正啊,
这道题搞了我两天了## 标题

你可能感兴趣的:(笔记)