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

正文內(nèi)容

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

2025-10-20 07:52 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 d carin(Sqstack amp。S,LinkQueue amp。Q,Elem car)//進(jìn)場(chǎng)函數(shù) { int k=0。//檢測(cè)信號(hào),當(dāng)值為 k=0時(shí)表示棧和隊(duì)中都找不到該車牌號(hào) QueuePtr r。 Elem *temp。 temp=。//賦值為棧底 while(temp!=) { if(tempcarnum==)//在棧中尋找是否有同一編號(hào)的車 { cout該車號(hào)在停車場(chǎng)中已存在,請(qǐng)重新輸入 !endl。 k=1。//找到了有同一編號(hào)的車 break。 } temp++。 } if(k==0amp。amp。!=)//如果在棧中未找到,在隊(duì)列中查找 { r=next。 //隊(duì)頭 while(ramp。amp。r!=) { r=rnext。//找不到繼續(xù)找 } if(ramp。amp。r==) { cout該車號(hào)在車道中已存在 ,請(qǐng)重新輸入 !endl。 k=1。 } } if(k==0)//棧和隊(duì)列中都找不到相同車牌號(hào),執(zhí)行入棧操作; { if(!=)//棧未滿, { carnum=。 time=。 ++。 couttempcarnum 號(hào)車于 時(shí)刻進(jìn)入停車場(chǎng)lengthstack(S)號(hào)車位! endl。 } else { enqueue(Q,)。//棧滿已滿,把車安排在車道隊(duì)列中 cout 停 車 場(chǎng) 已 滿 , 請(qǐng) 號(hào) 車 在 便 車 道lengthqueue(Q)稍等! endl。 } } } void carleave(Sqstack amp。S,LinkQueue amp。Q,Elem car)//車輛退出函數(shù) { int ture=0。//在棧中沒有找到與要離開的車 Elem e,em,*temp。 QueuePtr p,r。 temp=。 if(ture==0) { while(temp!=)//先在棧中尋找; { if(tempcarnum==) { int temp_cost。 temp_cost=(time)*price。 ture=1。//在棧中找到 cout號(hào)車在 時(shí)刻離開,停車時(shí)間為 time刻鐘,應(yīng)交停車費(fèi)用為: temp_costendl。 break。 } temp++。 } if(ture==1) //備用棧 { Sqstack spear。 initStack(spear)。 while(!=temp+1)//先在棧中尋找; { pop(S,em)。 push(spear,em)。 } pop(S,*temp)。//其他車退出停車場(chǎng)暫存在零時(shí)棧 if(!=) { while(!=) { pop(spear,em)。 push(S,em)。 } } } if(ture==1amp。amp。!=)//棧中有車離開,將隊(duì)列中的車進(jìn)入棧中 { dequeue(Q,e)。 //離隊(duì),并返回?cái)?shù)據(jù) e carnum=。 time=。 ++。 cout請(qǐng)便道的第一輛車 牌號(hào)為 的車輛轉(zhuǎn)入停車場(chǎng),停車位置為 lengthstack(S)號(hào) ,停車時(shí)刻為: endl。 } } if(ture==0amp。amp。!=)//棧中沒找到要離開的車 { p=。 r=next。 //隊(duì)頭 while(ramp。amp。r!=) { p=r。 r=rnext。 } if(ramp。amp。r==)//在隊(duì)列中找到要離開的車 { ture=2。 cout便道 r號(hào)車離開 ,不收取費(fèi)用! endl。 pnext=rnext。 free(r)。 } }//直接從隊(duì)列離開 if(ture==0) cout沒有該輛車 !endl。 } int main() { char c。 int j=0,temp_time,i=1。//i==0,判斷臨時(shí)記錄時(shí)間的 temp_time 應(yīng)該去該次的值,還是上次的值。 j==0,表示第一次輸入數(shù)據(jù),不需要檢測(cè)數(shù)據(jù)是否正確 LinkQueue Q。 Sqstack S。 Elem car。 initqueue (Q)。 initStack(S)。 ifstream infile。 cout歡迎使用停車場(chǎng)管理系統(tǒng)! endl。 cout請(qǐng)稍等!信息正在載入183
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1