摘要: #include<iostream> #include<malloc.h> #include<string.h> using namespace std; #define MAX 10 #define INF 0; typedef char E; typedef struct GraphMartix 阅读全文
posted @ 2023-12-19 20:29 Happy_Eric 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 图的Floyd算法求两点间的任意距离 这里用到的图的存储结构为邻接矩阵 时间复杂度为O(n3) Floyd算法实现如下 void Fluid(Graph g){ for(int i =0 ;i <g->vex;i++) for(int j=0;j<g->vex;j++) for(int k=0;k< 阅读全文
posted @ 2023-12-19 20:10 Happy_Eric 阅读(11) 评论(0) 推荐(0) 编辑