![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
floyd 和 dijkstra
u010912405
这个作者很懒,什么都没留下…
展开
-
hdu1869 floyd算法
本题使用floyd求出任意两点之间的距离,然后求出任意两点之间的距离是否 #include #include #include using namespace std; const int NP=102; const int INF=0x0fffffff; int map[NP][NP]; int N,M; void init() { for(int i=0;i<N;i++)原创 2013-08-20 10:45:15 · 376 阅读 · 0 评论 -
hdu 1874 最短路径 dijkstra 和floyd 算法
dijkstra 算法: #include #include #include #include using namespace std; const int NP=210; const int MP=1010; int map[NP][NP]; int dijkstra(int p,int t,int maxNode) { bool visited[NP]; int原创 2013-08-13 00:29:57 · 438 阅读 · 0 评论