freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

拓?fù)渑判?算法與數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì))-文庫吧資料

2025-07-05 13:05本頁面
  

【正文】 ,i)。 i。Q)。 LinkQueue Q。ElemType e。 } printf(\n)。 while(p!=NULL) { printf(%s ,[pvexpos].name)。 p=[i].firstarc。 i++) { printf(\n課程:%s ,[i].name)。 for(i=0。ArcNode *p。 return 1。 } (*G).vexhead[j].indegree++。 } else { newarcnext=(*G).vexhead[i].firstarcnext。 if((*G).vexhead[i].firstarc==NULL) { newarcnext=NULL。 } newarc=(ArcNode*)malloc(sizeof(ArcNode))。 } if(j=(*G).vexnum) { printf(課程%s不存在,有向圖建立失??!\n,v2)。 //定位課程并判斷課程是否存在 if(i=(*G).vexnum) { printf(課程%s不存在,有向圖建立失敗!\n,v1)。 i=LocateVex(*G,v1)。k++) { strcpy(v1,RelationV1[k])。 } for(k=0。i++) //鄰接表初始化 { (*G).vexhead[i].firstarc=NULL。 } for(i=0。i(*G).vexnum。 return 0。 (*G).arum=16。 system(PAUSE)。 /* 輸出本程序使用的課程及先后關(guān)系表 */ printf(\n本程序預(yù)置了如下課程及先后關(guān)系:\n)。 ArcNode *newarc。 }}//為避免演示時(shí)要輸入過多數(shù)據(jù),以下函數(shù)將課程編號、課程間的先后關(guān)系通過數(shù)組預(yù)置/* (鄰接表) */int CreateGraph2(ALGraph *G) //成功建立返回1,不成功則返回0{ int i,j,k。 p=pnext。 printf(鄰接點(diǎn):)。 printf(入度:%3d\n,[i].indegree)。 i。 printf(\n輸出有向圖:\n)。}/* */void PrintGraph(ALGraph G){ int i。 //對應(yīng)頂點(diǎn)入度計(jì)數(shù)加1 } printf(\n有向圖建立成功!\n)。 (*G).vexhead[i].firstarcnext=newarc。 (*G).vexhead[i].firstarc=newarc。 //前插法建頂點(diǎn)鏈表 newarcvexpos=j。return 0。return 0。j=LocateVex(*G,v2)。k++) { scanf(%s%s,v1,v2)。 //輸入有向圖的邊 for(k=0。 (*G).vexhead[i].indegree=0。i(*G).vexnum。i++) printf(%s ,(*G).vexhead[i].name)。//輸出頂點(diǎn)名稱 for(i=0。i++) { scanf(%s,(*G).vexhead[i].name)。 //輸入頂點(diǎn)名稱 for(i=0。return 0。(*G).arum)。 //輸入頂點(diǎn)數(shù)和弧數(shù) scanf(%d,%d,amp。ArcNode *newarc。 }/* (鄰接表) */int CreateGraph(ALGraph *G) //成功建立返回1,不成功則返回0{ int i,j,k。i++) if(strcmp(v,[i].name)==0) break。 for(i=0。 //圖的頂點(diǎn)數(shù)和弧數(shù)} ALGraph。typedef struct{ AdjList vexhead。 //頂點(diǎn)入度 ArcNode *firstarc。typedef struct VNode //頭結(jié)點(diǎn){ VertexType name。 //該弧所指向的頂點(diǎn)在數(shù)組中的位置 struct ArcNode *next。 }}/****************************************************//* 以下為有向圖(DAG)鄰接表存儲結(jié)構(gòu)(ALG)的操作 *//****************************************************/define MAX_VERTEX_NUM 20 //最大頂點(diǎn)個(gè)數(shù)typedef char VertexType[20]。 if (Qrear==p) Qrear=Qfront。 *e=pdata。 }/* */void DeQueue(LinkQueue *Q, ElemType *e){ QueuePtr p。 Qrearnext=p。 pdata=e。 p=(QueuePtr)malloc(sizeof(QNode))。 else return 0。 Qfrontnext=NULL。/* */void InitQueue(LinkQueue *Q){ Qfront=Qrear=(QueuePtr)malloc(sizeof(QNode))。 QueuePtr rear。} QNode,*QueuePtr。typedef struct QNode{ ElemType data。//圖的頂點(diǎn)數(shù)和弧數(shù)} ALGraph。typedef struct{ AdjList vexhead。//頂點(diǎn)入度 ArcNode *firstarc。typedef struct VNode//頭結(jié)點(diǎn){ VertexType name。//該弧所指向的頂點(diǎn)在數(shù)組中的位置 struct ArcNode *next。 圖的類型(鄰接表存儲結(jié)構(gòu))為:typedef char VertexType[20]。QueuePtr rear。} QNode,
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1