摘要: POJ1258 Prim算法。View Code #include <cstdio>#include <cstring>#define MAXN 110int d[MAXN][MAXN];int edge[MAXN]; bool visit[MAXN];int n;int Prim(){ int i, j, k, mst = 0; memset(visit, false, sizeof(visit)); memset(edge, 0x3f, sizeof(edge)); edge[0] = 0; for(i = 0; i < n; i ++) { ... 阅读全文
posted @ 2012-09-02 13:33 芒果布丁 阅读(243) 评论(0) 推荐(0) 编辑