摘要: 这道题bfs会t,所以用dfs。 bfs还需要限制搜索次数,depth次就有depth位。 #include<iostream> #include<algorithm> #include<cstring> #include<queue> using namespace std; typedef un 阅读全文
posted @ 2021-12-04 15:40 jkloveg 阅读(22) 评论(0) 推荐(0)
摘要: 因为没有限制从什么地方搜索,所以我们可以从任意一个格子搜索。 所以从遍历每行,dfs。 阅读全文
posted @ 2021-12-04 15:36 jkloveg 阅读(9) 评论(0) 推荐(0)