5653
static int N, M, K; static int board[1024][1024]; static int state[1024][1024]; static int org[1024][1024]; static int tmp[1024][1024]; static int d[4][2] = { -1, 0, //up 1, 0, //down 0, -1, //left 0, 1 //right }; static int solution(void) { queue q; queue qq; scanf("%d %d %d", &N, &M, &K); for (int y = 512 - N, cnt1 = 0; cnt1 < N; y++, cnt1++) { for (int x = 512 - N, cnt2 = 0; cnt2 < M; x++, cn..
2382
typedef pair pos; static int N, M, K; static int board[2][100][100]; static int direction[2][100][100]; static int tmp[100][100]; static queue q; static int d[5][2] = { 0, 0, -1, 0, //상, 실수했던 부분, 1, 0, //하, // 0, -1, //좌 0, 1 //우 }; static int changed[5] = { 0, 2, 1, 4, 3 }; static int solution(void) { int y, x, nr, dir; int turn = 0, ret = 0; scanf("%d %d %d", &N, &M, &K); for (int i = 0; i < K..