#include <stdio.h>
#define MaxV 100
#define INFINITY 最大的int值
typedef char VertexType;
typedef int EdgeType;
typedef struct {
VertexType Vex[MaxV];
EdgeType Edge[MaxV][MaxV];
int vexnum,arcnum;
}MGraph;
typedef struct ArcNode{
int adjvex;
struct ArcNode *next;
}ArcNode;
tepedef struct VNode{
VertexType data;
ArcNode *first;
}VNode,AdjList[MaxV];
typedef struct{
AdjList vertices;
int vexnum,arcnnum;
}ALGraph;
bool visited[MaxV];
void BFSTraverse(MGraph G){
for(i = 0;i<G.vernum;++i){
visited[i]=FALSE;
}
InitQueue(Q);
for(i = 0;i<G.vernum;++i){
if(!visited[i]){
BFS(G,i);
}
}
}
void BFS(Graph G,int v){
visit("%c",v);
visited[v] = TRUE;
Enqueue(Q,v);
while(!isEmpty(Q)){
DeQueue(Q,v);
for(w = FrstNeighbor(G,v);w>=0;w=NextNeighbor(G,v)){
if(!visited[w]){
visit(w);
visited[w]=TRUE;
EnQueue(Q,w);
}
}
}
}
int main () {
printf("Hello world! - c.jsrun.net.");
return 0;
}