摘要: 点击打开题目链接迪杰斯特拉的用法不多讲,详见 点击打开链接 。下面两个代码:这个是用邻接矩阵存图的迪杰斯特拉。#includeint main(){ int e[1005][1005],dis[1005],book[1005],i,j,n,m,t1,t2,t3,u,v,min; int... 阅读全文
posted @ 2016-04-24 21:29 Code-dream 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 存图改用数组模拟邻接表的方式:存单向图数组模拟邻接表详见 邻接表的数组实现 。迪杰斯特拉 详见点击打开链接。#include #include #include using namespace std;const int MAX_SIZE=110;const int INF=2e9+1e8;... 阅读全文
posted @ 2016-04-24 10:42 Code-dream 阅读(323) 评论(0) 推荐(0) 编辑