摘要: http://poj.org/problem?id=1511题意:在一个图中,求从1号节点到2-n号节点的最短距离和和从2-n节点到1节点的最短距离和;思路:因为数据太大,用spfa,且要建立双向的;代码:View Code #include <iostream>#include <algorithm>#include <cstring>#include <cstdlib>#include <cstdio>using namespace std;#define max 1000010#define inf 1000000050stru 阅读全文
posted @ 2012-04-27 22:14 LT-blogs 阅读(227) 评论(0) 推荐(0) 编辑