广度优先搜索BFS(cx14c) 摘要:解题思路:参考广度优先搜索BFS(cx14b)注意事项:因为是多组数据,记得清空visited[N][N],即memset(visited, 0, sizeof(visited));参考代…… 题解列表 2025年05月29日 0 点赞 0 评论 31 浏览 评分:0.0
BFS 迷宫问题 摘要:解题思路:注意事项:刚开始一直得到-1的结果TT 原来是下面这段代码的问题 这里要写!='#' 而不是=='-'if(nx>=1&…… 题解列表 2025年04月23日 0 点赞 0 评论 99 浏览 评分:0.0
小白的bfs与dfs代码(dfs超时了555,用/**/略掉了) 摘要:```cpp#includeusing namespace std;struct pos//能记录步数与位置的结构体{ int x;//第n行 int y;//第m列 …… 题解列表 2025年03月16日 0 点赞 0 评论 218 浏览 评分:0.0
迷宫问题 大家都用 BFS 那我来个 DFS 吧!!! 摘要:解题思路: 哈哈哈哈哈哈 DFS 太好用了 !!!!!!注意事项:参考代码:#include"bits/stdc++.h" using nam…… 题解列表 2024年12月03日 0 点赞 0 评论 207 浏览 评分:0.0
迷宫问题(Java) 广搜 摘要:```java import java.util.*; public class Main { public static class jiegou { int x…… 题解列表 2024年03月26日 0 点赞 0 评论 167 浏览 评分:0.0
小白随便写的,记录一下 摘要:看不懂可以看看这个视频:https://www.bilibili.com/video/BV1uA411N7c5?p=56&vd_source=a90641eb5a4eed71d3374febc12dd…… 题解列表 2024年03月24日 0 点赞 0 评论 200 浏览 评分:0.0
1672: 迷宫问题(记模型,以后遇到直接用) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstring>#include <queue>using namespace std;struct node{…… 题解列表 2024年03月17日 1 点赞 0 评论 263 浏览 评分:9.9
迷宫问题(bfs)(queue,pair) 摘要:解题思路:通过宽搜 搜出每一个格子起点的距离 最终输出注意事项: 无 本就很简单的题参考代码:#include<iostream> #include<queue> using namespac…… 题解列表 2023年08月04日 0 点赞 0 评论 149 浏览 评分:9.9
1672: 迷宫问题(bfs) 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <queue> using namespace std; struct node{ int x; …… 题解列表 2023年07月21日 0 点赞 0 评论 116 浏览 评分:0.0
#C++1672——迷宫问题(广搜) 摘要:注意:多组输入,记得重置相关变量,处理无终点情况ps:同类题------2177(终点和起点固定,输入单组) https://www.dotcpp.com/oj/problem2177.htmlAC…… 题解列表 2023年05月26日 0 点赞 0 评论 149 浏览 评分:5.0