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

正文內(nèi)容

中南民族大學(xué)數(shù)據(jù)結(jié)構(gòu)課程設(shè)計停車場管理系統(tǒng)(編輯修改稿)

2025-05-04 22:45 本頁面
 

【文章內(nèi)容簡介】 lem Qelem。}QNode,*QueuePtr。typedef struct//隊頭指針,隊尾指針{ QueuePtr front。 QueuePtr rear。}LinkQueue。void initqueue(LinkQueue amp。Q)//構(gòu)造一個車道空隊列{ ==(QueuePtr)malloc(sizeof(QNode))。 if(!)exit(OVERFLOW)。 next=next=NULL。}void enqueue(LinkQueue amp。Q,int carnum,int time)//車道入隊操作{ QueuePtr p=(QueuePtr)malloc(sizeof(QNode))。 p=carnum。 p=time。 pnext=NULL。 next=p。 =p。}int lengthqueue(LinkQueue Q)//求車道隊列長度{ int i=0。 QueuePtr p。 p=next。 while(p!=) { i++。 p=pnext。 } i++。 return i。}void dequeue(LinkQueue amp。Q,Elem amp。e)//從對頭離隊操作,并返回其值{ QueuePtr p=(QueuePtr)malloc(sizeof(QNode))。 if(==) cout車道中沒有車輛!endl。 if(!=) { p=next。 e=pQelem。 next=pnext。 if(==p) =。 free(p)。 }}void carin(Sqstack amp。S,LinkQueue amp。Q,Elem car)//進(jìn)場函數(shù){ int k=0。//檢測信號,當(dāng)值為k=0時表示棧和隊中都找不到該車牌號 QueuePtr r。 Elem *temp。 temp=。//賦值為棧底 while(temp!=) { if(tempcarnum==)//在棧中尋找是否有同一編號的車 { cout該車號在停車場中已存在,請重新輸入!endl。 k=1。//找到了有同一編號的車 break。 } temp++。 } if(k==0amp。amp。!=)//如果在棧中未找到,在隊列中查找 { r=next。 //隊頭 while(ramp。amp。r!=) { r=rnext。//找不到繼續(xù)找 } if(ramp。amp。r==) { cout該車號在車道中已存在,請重新輸入!endl。 k=1。 } } if(k==0)//棧和隊列中都找不到相同車牌號,執(zhí)行入棧操作; { if(!=)//棧未滿, { carnum=。 time=。 ++。 couttempcarnum號車于時刻進(jìn)入停車場lengthstack(S)號車位!endl。 } else { enqueue(Q,)。//棧滿已滿,把車安排在車道隊列中 cout停車場已滿,請?zhí)栜囋诒丬嚨纋engthqueue(Q)稍等!endl。 } }}void carleave(Sqstack amp。S,LinkQueue amp。Q,Elem car)
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1