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