校园导游.docVIP

  • 5
  • 0
  • 约6.46千字
  • 约 9页
  • 2015-12-19 发布于浙江
  • 举报
校园导游.doc

#include string.h #include stdio.h #include malloc.h #include stdlib.h #define Max 20000//最大值为20000 #define NUM 10//顶点最大数为10 typedef struct ArcCell//弧信息 { int adj; //权值,顶点距离 }ArcCell; typedef struct VertexType//顶点类型 { int number; char *sight; //景点名称 char *description;//景点介绍 }VertexType; typedef struct { VertexType vex[NUM];//顶点向量 ArcCell arcs[NUM][NUM];//数组表示,邻接矩阵 int vexnum,arcnum;//图的当前顶点数和弧数 }MGraph; MGraph G; int P[NUM][NUM]; //定义景点指针 long int D[NUM]; //最短距离 int x[10]={0}; void CreateUDN(int v,int a); void narrate(); void ShortestPath(int num); void output(int sight1,int si

文档评论(0)

1亿VIP精品文档

相关文档