摘要:
/* Name: 最短路(dijkstra邻接矩阵) Copyright: Author: Try_86 Date: 12/04/12 18:09 Description: */#include <cstdio>#include <cstring>#include <iostream>using namespace std;const int N = 105; const int MAX = 1000000000;//定义无穷大 bool vis[N];int map[N][N], dis[N];void init(int vs) {//初始化 for (i 阅读全文
posted @ 2012-04-12 18:21
Try86
阅读(191)
评论(0)
推荐(0)
摘要:
/* Name: 最短路(bellmanFord) Copyright: Author: Try_86 Date: 12/04/12 12:42 Description: 对每个起始点运行一次bellmanFord,求最短路 */#include <cstdio>#include <iostream>using namespace std;const int N = 1005;const int M = 500500;const int MAX = 1000000000;int dis[N], ss[N], ds[N];struct edge { int u; int. 阅读全文
posted @ 2012-04-12 12:47
Try86
阅读(252)
评论(0)
推荐(0)
浙公网安备 33010602011771号