摘要: #include<iostream>using namespace std;#define maxvex 100typedef struct{ int a[maxvex][maxvex]; int vex;}Graph;int visiteded[maxvex];void DFS(Graph G,int v){ printf("v%d ",v+1); visiteded[v]=1; for(int j=0;j<G.vex;j++) if(G.a[v][j]==1&&visiteded[j]==0) DFS(G,j);}void ... 阅读全文
posted @ 2012-11-03 03:03 myth_HG 阅读(245) 评论(0) 推荐(0) 编辑