1. <tt id="5hhch"><source id="5hhch"></source></tt>
    1. <xmp id="5hhch"></xmp>

  2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

    <rp id="5hhch"></rp>
        <dfn id="5hhch"></dfn>

      1. 尋找迷宮的出路,o通路;X:障礙

        時間:2020-11-23 10:00:43 筆試題目 我要投稿

        尋找迷宮的一條出路,o通路;X:障礙

          #define MAX_SIZE 8

          int H[4] = {0, 1, 0, -1};

          int V[4] = {-1, 0, 1, 0};

          char Maze[MAX_SIZE][MAX_SIZE] = {{‘X’,'X’,'X’,'X’,'X’,'X’,'X’,'X’},

          {‘o’,'o’,'o’,'o’,'o’,'X’,'X’,'X’},

          {‘X’,'o’,'X’,'X’,'o’,'o’,'o’,'X’},

          {‘X’,'o’,'X’,'X’,'o’,'X’,'X’,'o’},

          {‘X’,'o’,'X’,'X’,'X’,'X’,'X’,'X’},

          {‘X’,'o’,'X’,'X’,'o’,'o’,'o’,'X’},

          {‘X’,'o’,'o’,'o’,'o’,'X’,'o’,'o’},

          {‘X’,'X’,'X’,'X’,'X’,'X’,'X’,'X’}};

          void FindPath(int X, int Y) {

          if(X == MAX_SIZE || Y == MAX_SIZE) {

          for(int i = 0; i < MAX_SIZE; i++)

          for(int j = 0; j < MAX_SIZE; j++)

          printf(“%c%c”, Maze[i][j], j < MAX_SIZE-1 ? ‘ ‘ : ‘\n’);

          }else for(int k = 0; k < 4; k++)

          if(X >= 0 && Y >= 0 && Y < MAX_SIZE && X < MAX_SIZE && ‘o’ == Maze[X][Y]) {

          Maze[X][Y] = ‘ ‘;

          FindPath(X+V[k], Y+H[k]);

          Maze[X][Y] =’o';

          }

          }

          int main(int argc, char* argv[]) {

          FindPath(1,0);

          }

        【尋找迷宮的一條出路,o通路;X:障礙】相關文章:

        工程監理的出路08-18

        物流O2O有哪些模式-關于物流O2O的四種典型模式11-13

        經絡--中醫美容中深層滋養的通路10-30

        菜鳥面向農村的縣域O2O物流模式11-10

        管理溝通的障礙09-28

        O2O電商運營模式最佳方法11-02

        物流企業更適合O2O運營模式08-16

        80后草根創業O2O定制旅游09-08

        《迷宮街物語》讀后感12-10

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码

        1. <tt id="5hhch"><source id="5hhch"></source></tt>
          1. <xmp id="5hhch"></xmp>

        2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

          <rp id="5hhch"></rp>
              <dfn id="5hhch"></dfn>