摘要:
通过stl的queue实现的spfa(vector实现邻接表存图) 本模板没有考虑存在两点不连通的情况 如果需要判断则需要用到并查集或者遍历整个邻接表 阅读全文
posted @ 2016-11-16 13:43
2000xyy
阅读(94)
评论(0)
推荐(0)
摘要:
#include #include #include #include using namespace std; struct edge//存储边连接的点和改边的权值 { int to,w; }; vectormap[10001];//二维动态数组实现 int n,m; int x,y,z,k; int main () { edge e; cin>>n>>m; for (int i=1... 阅读全文
posted @ 2016-11-16 10:41
2000xyy
阅读(186)
评论(0)
推荐(0)

浙公网安备 33010602011771号