#include <stdio.h>
#include <stdlib.h>
#define MAX 1000
typedef struct SHORTRSTPATH_STRU
{
int size;
int**pathLen;
int **nextVex;
}ShortPath;
typedef struct GRAPHMATRIX_STRU
{
int size;
int **graph;
}GraphMatrix;
GraphMatrix* InitGraph(int num)
{
int i,j;
GraphMatrix *graphMatrix=(GraphMatrix*)malloc(sizeof(GraphMatrix));
graphMatrix->size=num;
graphMatrix->graph=(int**)malloc(sizeof(int*)*graphMatrix->size);
for(i=0;i<graphMatrix->size;i++)
graphMatrix->graph[i]=(int*)malloc(sizeof(int)*graphMatrix->size);
for(i=0;i<graphMatrix->size;i++)
{
for(j=0;j<graphMatrix->size;j++