最短路径
文章平均质量分 75
ych_ding
这个作者很懒,什么都没留下…
展开
-
POJ 1125 谣言传播速度
#include #include using namespace std; static const int MAXNODES = 101; static const int MAX = 999; /* caution */ static int weigh[MAXNODES][MAXNODES]; static int broker, shortest; static int n;原创 2013-09-04 11:22:02 · 796 阅读 · 0 评论 -
POJ 3259 判断图中是否存在负权回路
#include #include using namespace std; struct Edge { int s; int e; int t; }; static const int MAX = 30000; static const int MAXEDGES = 6000; /* caution */ static const int MAXNODES = 501; stati原创 2013-09-03 21:49:43 · 1544 阅读 · 0 评论 -
POJ 1860 bellman_ford
#include #include #include using namespace std; //#define DEBUG struct exchgpnt { int a; int b; double rab; double cab; }; static struct exchgpnt edges[100 * 2]; static int m, n, s; static dou原创 2013-10-05 22:09:37 · 569 阅读 · 0 评论 -
poj 1797
#include #include #include using namespace std; #define NODES 1001 static int n, m; static int matrix[NODES][NODES]; static int heavist[NODES]; static int isok[NODES]; //#define DEBUG void search原创 2013-09-11 16:08:15 · 517 阅读 · 0 评论