#include <stdio.h>
#define ENDROW 5
#define ENDCOL 4
int m[6][5];
int mark[6][5] = { {0,0,0,0,0}, // 이용위치 표시 행렬
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0},
{0,0,0,0,0}
};
int w[13][11] = { { 1,1,1,1,1,1,1,1,1,1,1}, // 벽 행렬
{ 0,1,0,1,1,1,0,1,0,1,1},
{ 1,1,1,0,1,0,1,1,1,0,1},
{ 1,1,0,1,1,1,1,1,1,1,1},
{ 1,1,1,0,1,0,1,0,1,0,1},
{ 1,1,1,1,0,1,1,1,0,1,1},
{ 1,0,1,1,1,1,1,0,1,1,1},
{ 1,1,0,1,1,1,0,1,1,1,1},
{ 1,0,1,0,1,0,1,1,1,0,1},
{ 1,1,1,1,0,1,1,1,1,1,1},
{ 1,1,1,0,1,1,1,0,1,0,1},
{ 1,1,0,1,0,1,0,1,0,1,0},
{ 1,1,1,1,1,1,1,1,1,1,1}
};
typedef struct{
int row;
int col;
int dir;
}element;