
图
高达一号
这个作者很懒,什么都没留下…
展开
-
矩阵乘法求最短路
算法导论矩阵乘法求最短路,如有错误望大家指出 #include #include #include #include using namespace std;#define MAXN 100#define INF 1000000class Mat_Graph{public: Mat_Graph(int num):n(num){ memset(Map,0,原创 2013-11-04 16:42:34 · 2077 阅读 · 0 评论 -
Floyd求最短路+输出路径上节点
//>求最短路--Floyd#include #include #include using namespace std;#define MAXN 100#define INF 1000000#define NIL 0class Graph{public: Graph(int num):n(num) { int i,j; memset(Map,0,size原创 2013-11-07 19:34:47 · 1685 阅读 · 0 评论 -
POJ_2485 Highway_Prim
2485:Highway查看 提交 统计 提示 提问总时间限制: 1000ms 内存限制: 65536kB The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficu...原创 2013-12-09 20:34:18 · 704 阅读 · 0 评论 -
POJ_2485 Highway_Kruskal
2485:Highway查看 提交 统计 提示 提问总时间限制: 1000ms 内存限制: 65536kB The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficu...原创 2013-12-09 10:37:08 · 827 阅读 · 0 评论 -
最小生成树—Kruskal模板
#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;typedef struct edge{ int start; int end; int weight;}Edge;#d...原创 2013-12-09 09:32:54 · 881 阅读 · 0 评论