From 1b363660141aad15e9a6e33910f265c59a54c712 Mon Sep 17 00:00:00 2001 From: xingyou wu <3050128610@qq.com> Date: Tue, 8 Apr 2025 17:24:51 +0800 Subject: [PATCH] =?UTF-8?q?lanqiao=2019712=20=E6=95=B0=E5=AD=97=E6=8E=A5?= =?UTF-8?q?=E9=BE=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 15lanqiao/test6.cpp | 1 + 1 file changed, 1 insertion(+) 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; // 字典需最小的