摘要: #include <iostream> using namespace std; #define _CRT_SECURE_NO_WARNINGS int map[51][51],vis[51][51]; int N,M; int sx, sy, ex, ey; int a[] = { 1, -1, 阅读全文
posted @ 2017-01-19 15:35 wujixing909 阅读(313) 评论(0) 推荐(0) 编辑
摘要: void dfs(int step){ if (step == N+1){ //1. 判断边界 for (int i = 1; i <= N; i++) cout << a[i] << " "; cout<< endl; return; //重要!返回之前调用的那次 } for (int i = 1 阅读全文
posted @ 2017-01-19 14:07 wujixing909 阅读(185) 评论(0) 推荐(0) 编辑