백준 14503번 로봇청소기.
왼쪽 오른쪽 방향 탐색할때 사용할 경우의 배열을 다 만들면서 하였다. 1개로 줄일수 있는 방법이 없을까 찾아봐야겠다. #include #include #include using namespace std; typedef struct { int position_x; int position_y; int dir; }robot_cleaner; enum { UP, RIGHT, DOWN, LEFT }ROBOT_DIR; int depth, width, result; int robot_x, robot_y, robot_dir; int Map[50][50]; int up_next_dir[4] = { 3,2,1,0 }; int up_dirx[4] = { -1,0,1,0}; int up_diry[4] = { 0,1,0,-1 }..