diff --git a/xitong.c b/xitong.c index 714e489..fec9166 100644 --- a/xitong.c +++ b/xitong.c @@ -148,4 +148,83 @@ void printff(){ for(i=0;ia,nm.adjust[h].name)) break; + cont[i][h]=1; + p=p->next; + } + } +} +void print() { + edgenode* p; + int i; + for(i=0;i[%s]",p->a); + p=p->next; + } + printf("\n"); + } +} + int num2=0; + int money=0; + void Dijkstra(int v1,int v2){ + int dist[MAX],s[MAX],path[MAX];//s判断v1是否已经判断最短路径,path前驱 + int min,i,j,u,pre; + for(i=0;i",nm.adjust[pre].name); + money++; + pre=path[pre]; + } + printf("%s",nm.adjust[pre].name); + } + else printf("路径不存在!"); + } + } + printf("\n"); } \ No newline at end of file