2013年5月30日
摘要: #include#include#include#include#include#include#includeusing namespace std;const int maxn=10;struct ArcNode{ int to; struct ArcNode *next;};int n,m;//顶点个数,边数ArcNode* List[maxn];//各顶点边链表的表头指针int count[maxn];//各顶点入度char output[100];//输出内容void TopSort(){ int top=-1; ArcNode* temp; bool ... 阅读全文
posted @ 2013-05-30 21:34 ∑求和 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 其中n和m分别表示图的顶点数和边数。#include#include#include#include#include#include#include#includeusing namespace std;const int maxn=11;const int maxm=20;int n,m;struct Edge{ int u,v,w;} edges[maxm];class set{public: void makeset(int n) { for(int i=0; irank[y]) { father[y]=x; ... 阅读全文
posted @ 2013-05-30 21:25 ∑求和 阅读(164) 评论(0) 推荐(0) 编辑