2011年8月11日

ACM PKU 1251 Jungle Roads http://poj.org/problem?id=1251

摘要: 最小生成树水题,用prim ,注意一下图书无向图; 1 #include <iostream> 2 #include <string.h> 3 #include <stdio.h> 4 using namespace std; 5 6 const int maxn=27; 7 8 const int inf=0x7fffffff; 9 10 int village;11 12 int lowcost[maxn],adjvex[maxn];13 14 int G[maxn][maxn];15 16 int MinEdge()17 {18 int index = 阅读全文

posted @ 2011-08-11 16:52 _Clarence 阅读(213) 评论(0) 推荐(0) 编辑

导航