# include & lt; stdio.h> # include & lt; stdlib.h> # include & lt; string.h> typedef char  VertexType[5];,//存储顶点值 # define MaxSize 50 # define INIT 10000年 typedef struct //邻接矩阵,存储弧的信息 { ,,,int 调整; }ArcNode, AdjMatrix[最大容量](最大尺寸); typedef struct ,,//图的类型定义 { ,,,VertexType 烦恼(最大容量),,,//存储顶点值 ,,,AdjMatrix 电弧;,,//邻接矩阵 ,,,int arcnum, vexnum;,,,//前者弧数,后者顶点数 }MGraph; void CreateVertex (MGraph * G),,,,//创建邻接矩阵 { ,,,int i, j, k, w,,, ,,,VertexType v1、v2; ,,,, ,,,printf(“请输入有向带权图的顶点数和弧数:(空格间隔)\ n”); ,,,scanf (“% d % d”, (* G) .vexnum,, (* G) .arcnum); ,,,, ,,,printf(“请输入% d个顶点的值:\ n”, G→vexnum); ,,,for (, i=0;, i
邻接矩阵表示有向带权图