5650
static int N; static int board[100][100]; static int map_y[11][100]; static int map_x[11][100]; static int d[4][2] = { -1, 0, //up, 0 1, 0, //down, 1 0, -1, //left, 2 0, 1 //right, 3 }; static int changed[4][6] = { 1, 1, 3, 2, 1, 1, 0, 3, 0, 0, 2, 0, 3, 0, 1, 3, 3, 3, 2, 2, 2, 1, 0, 2 }; static bool out_of_bound(int y, int x) { if (y = N) return true; if (x = N) return true; ..
1949
static int N, K; static int board[8][8]; static int start[5][2]; //최고봉 위치는 최대 5개, static int d[4][2] = { -1, 0, //up 1, 0, //down 0, -1, //left 0, 1 //right }; static int visit[8][8]; static int max_len; static inline bool out_of_bound(int y, int x) { if (y = N) return true; if (x = N) return true; return false; } static void __solution(int y, int x, int len, int is_cut) { if..
2117
static int N, M; static int board[20][20]; static int d[2][2] = { -1, 0, //up 1, 0 //down }; typedef struct { int y, x, len; }info; static bool out_of_bound(int y, int x) { if (y = N) return true; if (x = N) return true; return false; } static int get_home(int k, int y, int x) { int ret = 0, len = 2 * k - 1; queue q; q.push({ y, x, len }); //중심, len -= 2; for (int i = 1; i < ..
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..