优质题解 蓝桥杯2015年第六届真题-穿越雷区 (C++代码) 摘要:解题思路: DFS 核心代码,根据题意添加操作。void DFS( 状态参数 ) { if ( 目的状态 ) { 目的 题解列表 2018年06月07日 4 点赞 1 评论 2983 浏览 评分:8.3
蓝桥杯2015年第六届真题-穿越雷区 (C++代码) 摘要:#include<iostream> #include<algorithm> #include<queue> using namespace std; const int MAXN=101; …… 题解列表 2018年09月06日 0 点赞 0 评论 1512 浏览 评分:0.0
优质题解 蓝桥杯2015年第六届真题-穿越雷区 (C++代码)广搜,较为详细讲解 解题思路:利用广搜算法来做这题,一般像这种二维数组的地图,让你走去一个地方,求最短路程都可以用深搜或者广搜,不过地图一旦大了,那么深搜就较为容易超时的,看情况来吧,地图小,深搜和广搜都可以,地图大了,还是建议广搜好一点注意事项:广搜的特点就是, 题解列表 2018年09月12日 4 点赞 2 评论 2715 浏览 评分:9.1
蓝桥杯2015年第六届真题-穿越雷区 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; struct s{ int x,y,s; }q[1000]; cha…… 题解列表 2018年11月06日 0 点赞 0 评论 2127 浏览 评分:0.0
蓝桥杯2015年第六届真题-穿越雷区 (C++代码) 摘要:解题思路:注意事项:参考代码:#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #includ…… 题解列表 2018年12月12日 0 点赞 0 评论 1071 浏览 评分:0.0
蓝桥杯2015年第六届真题-穿越雷区 (C++代码) 摘要:解题思路: 最普通的一道搜索题目,dfs跟bfs都能做,需要注意的是每一行的两个数据中间有空格。注意事项:参考代码:#include <iostream>#include <algo…… 题解列表 2019年02月09日 0 点赞 0 评论 1323 浏览 评分:2.0
旋桜-蓝桥杯2015年第六届真题-穿越雷区-bfs(C++代码) 最短路径用广搜(BFS)话不多说上代码```cpp#include#includeusingnamespacestd;structnode{intx;inty;intstep;intstatus;//+为1,负为-1,正常为0node(intx, 题解列表 2020年01月17日 0 点赞 0 评论 1234 浏览 评分:9.6
蓝桥杯2015年第六届真题-穿越雷区 (C++代码) 本题用最典型的bfs算法,定义了一个保存了x,y坐标,步数,权值的结构体,要记好结构体赋值的公式,希望大家指点。```cpp#include#includeusingnamespacestd;intx1,x2,y1,y2;chara[10][10];intb[10][10];intb1[4]={-1, 题解列表 2020年02月14日 0 点赞 0 评论 1119 浏览 评分:9.9
穿越雷区-题解(C++代码) 一遍过,新手上路DFS #includeusingnamespacestd;intn;//a存,b标记chara[101][101];charb[101][101];//u,v表移动方向intu[4]={1,0,-1,0};intv[4]={0,1,0,-1};intMintexp=999999999;intA_x, 题解列表 2020年02月15日 0 点赞 0 评论 1335 浏览 评分:9.9
蓝桥杯2015年第六届真题-穿越雷区-题解(C++代码)两种方法(dfs+bfs) 摘要:**方法**:dfs,dfs求最短路 **dfs**: **思路:** - 终止条件:走到‘B’ - 往下走条件:下一个点没被访问过,在地图之内,符合走一正一负 1. !vis[x][y]没…… 题解列表 2020年02月22日 0 点赞 0 评论 1636 浏览 评分:9.9