InitStack(S);
DFS(G,S,x,0);
printf("该图的一个欧拉回路为:");
while(!StackEmpty(S))
{
GetTop(S,m);
printf("->v%d",m);
Pop(S);
}//while
}
void InputM1(Graph &G)
{
int h,z;
printf("Please input 顶点数和边数\n");
scanf("%d",&v);
scanf("%d",&e);
for(int i=0;i
sum=0;
for(j=0;j
汉密尔顿图与欧拉图的区别只在于,边与顶点的区别,欧拉图是每边经过一次,汉密尔
顿图是每顶经过一次。