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

正文內(nèi)容

迷宮問題課程設(shè)計報告(參考版)

2025-04-14 23:03本頁面
  

【正文】 }}20 LD盡我所能。jn+2。im+2。 }}}/* Description: 恢復(fù)路徑函數(shù)*/void Restore(int **maze,int m,int n) //恢復(fù)迷宮{int i,j。 case 4:cout向左)\n。 case 3:cout向上)\n。 case 2:cout向右)\n。 case 1:cout向下)\n。 switch() //輸出相應(yīng)的方向 {case 0:cout)\n。,39。(39。 } while(!()) //棧非空,繼續(xù)輸出 {data=()。 //向左,用4表示 (tempdata)。 //向右,用2表示 else if(row==1) temp=3。 //列坐標(biāo)方向 if(row==1) temp=1。 //獲取下一個位置 //得到行走方向 row=().xtemp。 while(!()) //棧p非空,則轉(zhuǎn)移 {temp=new Node。 (tempdata)。 temp=new Node。 DataType data。 stack t。 cout ★★迷宮的路徑為endl。}} return 0。().y==().y)//如果沒有新位置入棧,則返回到上一個位置 {()。 }} //表示成功找到路徑 if(().x==().xamp。 Restore(maze,m,n)。 (Temp1)。 =n。amp。 //標(biāo)志新位置已到達(dá)過 (Temp1)。 =y。 y=+move[loop].y。loop4。().y==().y)) (Temp2)。 if(!(().x==().xamp。 maze[1][1]=1。 (Temp1)。 =1。 //創(chuàng)新點四:用棧p、q,分別存探索迷宮的過程和存儲路徑 DataType Temp1,Temp2。 return maze。in+2。i++) maze[i][0]=maze[i][n+1]=1。} for(i=0。 flush(cout)。 opench。039。j=n。i=m。 //創(chuàng)新點三:按玩游戲人的意愿創(chuàng)建存儲迷宮的文件,也可不建立。 cinstr。 string str。y39。Y39。 cinchoose。 cout ★是否保存新迷宮?(y/n): 。j=n。i=m。i++) {maze[i]=new int[n+2]。 for(i= 0。 n=b。 cout ★請輸入迷宮內(nèi)容(0代表可通,1代表不通):\n。 //輸入迷宮的長和寬 cout 請輸入迷宮的寬:。 cout 請輸入迷宮的長:。int**maze。n) //將自定義迷宮寫入文件{int a,b。 }int** writeFile (int amp。} } ()。 i++。\n39。 //在屏幕中顯示迷宮 j++。039。039。139。 ifstream open1()。i++) //申請空間 {maze[i]=new int[n+2]。 //申請長度等于行數(shù)加2的二維指針(為后面的回復(fù)迷宮打下基礎(chǔ)) for(i= 0。 //讀取文件結(jié)束 m=i。 //得列數(shù) j=0。) { i++。 } //是‘0’或‘1’字符寬就加1 if(ch==39。139。039。 //定義一個字符,讀取文件中的內(nèi)容 ifstream open()。 cout 文件中的迷宮如下: endl。 cout ★您選擇的是直接從文件中讀取迷宮!endl。n) //讀出文件{int **maze。}/* Description: 獲取迷宮函數(shù)*/int** readFile (int amp。 } cout◆◆◆◆◆◆◆ 謝謝,您已經(jīng)退出迷宮系統(tǒng) ◆◆◆◆◆◆◆endl。 if(c==n) flag1=1。 char c。 coutendl。 } if(findpath(maze,m,n)) cout ★ Congratulations! 迷宮路徑探索成功!endl。flag=1。b39。flag=1。a39。 cinch。 cout b直接自行輸入endl。 cout ★請從以下選項中選擇獲取迷宮的方法!endl。 int flag=0,flag1=0。 int **maze。 cout 歡迎進(jìn)入迷宮游戲 endl。 cout 專業(yè)班級: 計算機(jī)061班endl。 cout ——迷宮問題 endl。 cout 20072008年度第一學(xué)期數(shù)據(jù)結(jié)構(gòu)課程之課程設(shè)計 endl。/*
點擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1