摘要:
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 ++) { ... 阅读全文