最短路
__AiR_H
智障蒟蒻,蠢哭。。。QwQ
展开
-
最短路 2016.4.17
1、HDU 2544 最短路解题思路: dijkstra模版#include <iostream> #include <cstdio> #include <cstring>using namespace std;const int INF = 0x3f3f3f3f; const int maxn = 100 + 5; int N, M; int Map[maxn][maxn]; bool vis[原创 2016-04-17 12:43:24 · 717 阅读 · 0 评论 -
最短路 2016.9.1
1、UVa 10048 Audiophobia 参考:http://blog.csdn.net/shuangde800/article/details/7985085 题意: c1到c2的每条路径的声强为这条路径所包含的边的最大权值 求c1到c2的声强最小的一条路径的声强 解题思路: Floyd变形 #include #include #include using原创 2016-06-07 15:30:06 · 328 阅读 · 0 评论 -
最短路
1、HDU 2680 Choose the best route 参考:http://blog.csdn.net/niushuai666/article/details/6794343 解题思路: 1、增加源点 0 到 w 个点的距离为 0 2、反向建图,求从终点到 w 个点的最短距离 注意:重边取最小 #include #include #include #include #原创 2017-02-24 19:42:31 · 295 阅读 · 0 评论