91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-13
  • 語(yǔ)言: C/C++
  • 標(biāo)簽:

資源簡(jiǎn)介

用c語(yǔ)言編寫(xiě)的公園導(dǎo)游圖系統(tǒng)代碼,解決數(shù)據(jù)結(jié)構(gòu)中公園導(dǎo)游圖問(wèn)題

資源截圖

代碼片段和文件信息

#include?
#include?
/*定義符號(hào)常量*/?
#define?INT_MAX?10000?
#define?n?10?
/*定義全局變量*/?
int?cost[n][n];/*?邊的值*/?
int?shortest[n][n];/*?兩點(diǎn)間的最短距離*/?
int?path[n][n];/*?經(jīng)過(guò)的景點(diǎn)*/?
/*自定義函數(shù)原型說(shuō)明*/?

int?shortestdistance();
void?floyed();?
void?display(int?iint?j);
?
void?main()?/*主函數(shù)*/
{?
????int?ij;?
????char?k;?
????for(i=0;i<=n;i++)?
???????for(j=0;j<=n;j++)?
???{
???cost[i][j]=INT_MAX;?
???????????cost[1][3]=cost[3][1]=200;?
???????????cost[2][3]=cost[3][2]=100;?
???????????cost[2][4]=cost[4][2]=200;?
???????????cost[3][10]=cost[10][3]=400;?
???????????cost[1][10]=cost[10][1]=400;?
???????????cost[2][10]=cost[10][2]=400;?
???????????cost[4][10]=cost[10][4]=400;?
???????????cost[1][4]=cost[4][1]=500;?
???????????cost[4][5]=cost[5][4]=300;?
???????????cost[4][9]=cost[9][4]=400;?
???????????cost[5][9]=cost[9][5]=800;?
???????????cost[5][7]=cost[7][5]=400;?
???????????cost[5][6]=cost[6][5]=200;?
???????????cost[6][7]=cost[7][6]=100;?
???????????cost[7][8]=cost[8][7]=300;?
???????????cost[8][6]=cost[6][8]=400;?
???????????cost[1][1]=cost[2][2]=cost[3][3]=cost[4][4]=cost[5][5]=0;?
???????????cost[6][6]=cost[7][7]=cost[8][8]=cost[9][9]=cost[10][10]=0;?
???}
?????while(1)?
?{??printf(“????\n“);
printf(“*******************************************************************************\n“);
????????printf(“**????????----------------歡迎使用該公園導(dǎo)游系統(tǒng)!----------------????????????**\n“);?
????????printf(“*******************************************************************************\n“);
printf(“**?????????????????????????公園地圖如下:?????????????????????????????????????**\n“);
????printf(“**??????????????????????????<景點(diǎn)9>??????????????????????????????????????????**\n“);
????printf(“**????????????????????????????.?????.????????????????????????????????????????**\n“);
????printf(“**??????????????????????????.??????????.?????????????????????????????????????**\n“);
????printf(“**???????????????????<景點(diǎn)8>??????????????.??????????????????????????????????**\n“);
????printf(“**??????????????????????.??????????<景點(diǎn)6>????.??????????????????????????????**\n“);
????printf(“**????????????????????.???????????????.????.?????.???????????????????????????**\n“);
????printf(“**?????????????<景點(diǎn)5>??????????????.?????????.????.?????????????????????????**\n“);
????printf(“**??????????????????.??.???????????.?????????????.???.???????????????????????**\n“);
????printf(“**???????????????????.???.<景點(diǎn)4>.??.??.??.??.??.<景點(diǎn)7>?????????????????????**\n“);
????printf(“**????????????????????.????.????.??????????????????.?????????????????????????**\n“);
????printf(“**?????????????????????.??????.???.???????????????.??????????????????????????**\n“);
????printf(“**??????????????????????.???.??<景點(diǎn)3>??????????.????????????????????????????**\n“);
????printf(“**??????????????????<景點(diǎn)2>????.????.?????????.??????????????????????????????**\n“);
????printf(“**?????????????????????????.???????.?????景點(diǎn)1>???????????????????????????

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????7570??2009-07-18?09:30??111.cpp

-----------?---------??----------?-----??----

?????????????????7570????????????????????1


評(píng)論

共有 條評(píng)論

相關(guān)資源