#include"type.h" #include /*********************** 功能:创建图结构 输入:给图中的点赋予该点的编号,名称以及简介 输出:无 ***********************/ int CreatGrath(MatGrath &G)//进行图的创建 { int i,j; G.vexnum=10; //说明图的顶点的数目 G.arcnum=14; //说明图的边的数目 for(i=1;i<=G.vexnum;i++) { G.vexs[i].bianhao=i; } strcpy(G.vexs[1].sight,"济南市"); strcpy(G.vexs[2].sight,"德州市"); strcpy(G.vexs[3].sight,"淄博市"); strcpy(G.vexs[4].sight,"潍坊市"); strcpy(G.vexs[5].sight,"烟台市"); strcpy(G.vexs[6].sight,"威海市"); strcpy(G.vexs[7].sight,"青岛市"); strcpy(G.vexs[8].sight,"日照市"); strcpy(G.vexs[9].sight,"临沂市"); strcpy(G.vexs[10].sight,"济宁市"); strcpy(G.vexs[11].sight,"泰安市"); strcpy(G.vexs[12].sight,"滨州市"); strcpy(G.vexs[13].sight,"菏泽市"); strcpy(G.vexs[14].sight,"即墨市"); strcpy(G.vexs[15].sight,"胶州市"); strcpy(G.vexs[16].sight,"胶南市"); strcpy(G.vexs[17].sight,"诸城市"); strcpy(G.vexs[18].sight,"高密市"); strcpy(G.vexs[19].sight,"安丘市"); strcpy(G.vexs[20].sight,"莒县"); strcpy(G.vexs[21].sight,"平度市"); strcpy(G.vexs[22].sight,"莱西市"); strcpy(G.vexs[23].sight,"莱阳市"); strcpy(G.vexs[24].sight,"海阳市"); strcpy(G.vexs[25].sight,"乳山市"); strcpy(G.vexs[26].sight,"文登市"); strcpy(G.vexs[27].sight,"荣成市"); strcpy(G.vexs[28].sight,"牟平区"); strcpy(G.vexs[29].sight,"蓬莱市"); strcpy(G.vexs[30].sight,"栖霞市"); strcpy(G.vexs[31].sight,"莱州市"); strcpy(G.vexs[32].sight,"招远市"); strcpy(G.vexs[33].sight,"龙口市"); strcpy(G.vexs[34].sight,"昌邑市"); strcpy(G.vexs[35].sight,"昌乐"); strcpy(G.vexs[36].sight,"孝光市"); strcpy(G.vexs[37].sight,"青州市"); strcpy(G.vexs[38].sight,"临朐"); strcpy(G.vexs[39].sight,"沂水"); strcpy(G.vexs[40].sight,"广饶"); strcpy(G.vexs[41].sight,"东营市"); strcpy(G.vexs[42].sight,"沂源"); strcpy(G.vexs[43].sight,"恒台"); strcpy(G.vexs[44].sight,"博兴"); strcpy(G.vexs[45].sight,"博山"); strcpy(G.vexs[46].sight,"沂南"); strcpy(G.vexs[47].sight,"蒙阴"); strcpy(G.vexs[48].sight,"莱芜市"); for(i=0;i