摘要: BFS。同时记录每个进队节点的父亲节点,以便于输出路径。 细节很多,较为复杂,请见下面的代码(含有详细注释)。 #include<iostream> #include<cstdio> #include<algorithm> #include<queue> #include<cstring> #inc 阅读全文
posted @ 2022-02-01 16:40 wuwenhao 阅读(26) 评论(0) 推荐(0)