rat maze | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

rat maze

Pls help me in rat 10 length 10 width (c or java) https://www.sololearn.com/discuss/3176197/?ref=app 0 indicates the block is a path, and 1 indicates the block is a wall.      int mg[M+1][N+1]={  /*M=10,N=10*/        {1,1,1,1,1,1,1,1,1,1},       {1,0,0,1,0,0,0,1,0,1},   {1,0,0,1,0,0,0,1,0,1},   {1,0,0,0,0,1,1,0,0,1},   {1,0,1,1,1,0,0,0,0,1},   {1,0,0,0,1,0,0,0,0,1},   {1,0,1,0,0,0,1,0,0,1},   {1,0,1,1,1,0,1,1,0,1},   {1,1,0,0,0,0,0,0,0,1},   {1,1,1,1,1,1,1,1,1,1}};

27th Dec 2022, 6:06 PM
Mohammed Almathani
Mohammed Almathani - avatar
3 ответов
+ 3
Please provide a complete and clear task description. Show your code attempt.
27th Dec 2022, 6:13 PM
Lisa
Lisa - avatar
0
0 indicates the block is a path, and 1 indicates the block is a wall.      int mg[M+1][N+1]={  /*M=10,N=10*/        {1,1,1,1,1,1,1,1,1,1},       {1,0,0,1,0,0,0,1,0,1},   {1,0,0,1,0,0,0,1,0,1},   {1,0,0,0,0,1,1,0,0,1},   {1,0,1,1,1,0,0,0,0,1},   {1,0,0,0,1,0,0,0,0,1},   {1,0,1,0,0,0,1,0,0,1},   {1,0,1,1,1,0,1,1,0,1},   {1,1,0,0,0,0,0,0,0,1},   {1,1,1,1,1,1,1,1,1,1}};
27th Dec 2022, 6:35 PM
Mohammed Almathani
Mohammed Almathani - avatar
0
  typedef struct stack_type{              block_type block[Max];   /*blocks are stack elements*/              int top;           /*stack top*/      } stack_type;                   /*stack definition*/      typedef struct block_type{              int i, j;                                /* row & column number */              int di;                                 /*next exploring direction*/      }block_type;                   /*block definition*/
27th Dec 2022, 6:37 PM
Mohammed Almathani
Mohammed Almathani - avatar