typedef struct
{
int vertex[max];
int arc[max][max];
int vexnum,arcnum;
}MGraph;
typdef struct ArcNode
{
int adjvex;
struct ArcNode *next;
}ArcNode;
typedef struct VNode
{
int data;
ArcNode *first;
}VNode;
typedef struct
{
VNode vertices[max];
int vexnum,arcnum;
}ALGraph;
void ALtom(ALGraph G,int arc[m][n])
{
for(i=0;i<n;i++)
{
p=G->vertices[i].first;
while(p!=NULL)
{
arcs[i][p->data]=1;
p=p->next;
}
}
}