diff --git a/15lanqiao/test6.cpp b/15lanqiao/test6.cpp index eb87ef6..47f00be 100644 --- a/15lanqiao/test6.cpp +++ b/15lanqiao/test6.cpp @@ -10,6 +10,7 @@ int dx[] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dy[] = { 0, 1, 1, 1, 0, -1, -1, -1}; string res; // 结果字符串 +// x, y为搜索的位置坐标, pre 前一个访问位置的数字, s 当前路径的访问序列, dep 搜索的深度 void dfs(int x, int y, int pre, string s, int dep){ if(x == n && y == n && dep == n*n){ if(res.empty()) res = s; // 字典需最小的