![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图--最短路
angel_e
这个作者很懒,什么都没留下…
展开
-
最短路 dijkstra模板
#include "stdio.h" //最短路 dijkstra模板 //hdu 1233 #include "string.h" #define MAX 0x3fffffff int map[105][105]; int main() { int n,m; int x,y,k; int mark[105],dis[105]; int i,j,min,sum;原创 2013-11-28 14:29:35 · 449 阅读 · 0 评论 -
最短路 kruskal模板
#include "stdio.h" //最短路 Kruskal算法 存边,排序,并查集合并,直至要求的两点相通,输出最小结果 //hdu 1233 #include "stdlib.h" struct node { int x,y; int w; }line[10005]; int ans; int set[10005]; int cmp(const void *a,原创 2013-11-28 14:24:53 · 512 阅读 · 0 评论 -
最短路 SPFA模板
#include "cstdio" //邻接表+spfa算法(不断松弛操作) #include "queue" #include "string.h" using namespace std; struct node { int x; int value; //价值 int next; //存下一条边的下标 }edge[60000]; int n,m,idx; bool mar原创 2013-11-27 15:30:42 · 544 阅读 · 0 评论