-
24点的程序,用vc写的,很好的 !
24点的程序,用vc写的,很好的 !-24 point program that will vc write good!
- 2022-07-09 15:48:26下载
- 积分:1
-
[输入]
图的顶点个数N,图中顶点之间的关系及起点A和终点B
[输出]
若A到B无路径,则输出“There is no path” 否则输出A到B路...
[输入]
图的顶点个数N,图中顶点之间的关系及起点A和终点B
[输出]
若A到B无路径,则输出“There is no path” 否则输出A到B路径上个顶点
[存储结构]
图采用邻接矩阵的方式存储。
[算法的基本思想]
采用广度优先搜索的方法,从顶点A开始,依次访问与A邻接的顶点VA1,VA2,...,VAK, 访问遍之后,若没有访问B,则继续访问与VA1邻接的顶点VA11,VA12,...,VA1M,再访问与VA2邻接顶点...,如此下去,直至找到B,最先到达B点的路径,一定是边数最少的路径。实现时采用队列记录被访问过的顶点。每次访问与队头顶点相邻接的顶点,然后将队头顶点从队列中删去。若队空,则说明到不存在通路。在访问顶点过程中,每次把当前顶点的序号作为与其邻接的未访问的顶点的前驱顶点记录下来,以便输出时回溯。
#include
int number //队列类型
typedef struct{
int q[20]
-[imported] map of the number of vertices N, Vertex map of the relationship between the starting point and end point A and B [output] if A to B without path then exporting "There is no path" Otherwise output A to B on the path vertices [storage structure] plan adopted adjacency matrix of storage. [Algorithm for the basic idea] BFS way from the vertex A, A visit followed with adjacent vertices VA1, VA2 ,..., VAK, visiting times, if not visit B, continue to visit with the VA1 adjacent vertices VA11, VA12 ,..., VA1M. VA2 and then
- 2022-01-25 22:50:29下载
- 积分:1
-
用vb制作的火车票订票系统。欢迎大家下载
用vb制作的火车票订票系统。欢迎大家下载-Schools designed specifically for students of information management systems. Welcome to download
- 2022-02-10 09:47:33下载
- 积分:1
-
啁啾光纤光栅的matlab程序,给出了相应的源代码,等。
啁啾光纤光栅的Matlab程序,给出了相应的源程序,产生的refl记录了反射和透射谱。-Chirped fiber grating Matlab program, gives the corresponding source code, the resulting refl recorded reflection and transmission spectra.
- 2022-07-21 06:56:02下载
- 积分:1
-
脑的三维医学数据
3d medical brain data
- 2022-01-28 03:13:02下载
- 积分:1
-
linux下的Qt编程源程序,此程序将实现动态显示字符,并不断改变颜色...
linux下的Qt编程源程序,此程序将实现动态显示字符,并不断改变颜色-the Qt programming source, this procedure will achieve dynamic display characters, and changing colors
- 2022-05-08 07:06:36下载
- 积分:1
-
梦想世界虚拟社区
梦想世界虚拟社区- Vainly hopes for the world hypothesized community
- 2022-01-24 18:41:53下载
- 积分:1
-
一个简单的模拟喷泉的VB代码,教你有关图片的运用
一个简单的模拟喷泉的VB代码,教你有关图片的运用-Simulation of a simple fountain of VB code, teach you about the use of Picture
- 2022-12-30 03:40:03下载
- 积分:1
-
运动会分数统计
运动会分数统计- The games score counts
- 2022-08-19 08:50:12下载
- 积分:1
-
实现在矩阵的大多数运算,例如加减乘除等,求逆,求转置等
实现在矩阵的大多数运算,例如加减乘除等,求逆,求转置等-implement the caculate of metric--multiple,add,sub,inverse and so on.
- 2022-08-24 14:07:48下载
- 积分:1