
最短路
_Yyg
这个作者很懒,什么都没留下…
展开
-
poj 1125 Stockbroker Grapevine (Floyed)
思路:题目给我们一些边,让我们算出通过哪个点以最快的速度遍历图中每个点。很容易想到floyed。代码:#include#include#includeusing namespace std;int map[105][105];int n , a , b , m;int main(){ while(~scanf("%d" , &n)){ if(原创 2013-07-14 07:56:39 · 455 阅读 · 0 评论 -
hdu 4725 The Shortest Path in Nya Graph (SPFA+SLF优化)
#include#include#include#includeusing namespace std;const int maxn = 100500;const int inf = 0x3f3f3f3f;int t , n , m , c , vis[maxn * 4] , cnt[maxn * 4] , dist[maxn * 4] , cc , a , b;struct原创 2013-09-17 17:57:34 · 508 阅读 · 0 评论