
bfs
文章平均质量分 91
xiaohuihuicb
分享快乐
展开
-
shuoj1019-Prime Path--bfs
Description The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It原创 2015-09-09 16:59:04 · 613 阅读 · 0 评论 -
猎人抓兔子的bfs搜索解法
有五个山洞,一字排开,一只兔子住在某个洞,每天晚上会换住到相邻的洞中,一个猎人只能每天早上去一个洞,问怎样的检查序列能确保抓到兔子。 这个问题,可以说是一个智力题了,当然我的智力没有达标,所以没有想出来。 所以我打算写一段代码找出一个可以实现的序列,来减少我脑细胞的消耗。 要找出一个序列,当然市越短越好了,所以我运用bfs的搜索方法来记录当天检查的洞,兔子可能的藏身之洞以及之前检查的洞。 ...原创 2018-10-11 11:19:14 · 3127 阅读 · 0 评论