5656
static int N, M; static char board[750][750]; static int visit[750][750][2]; static queue q; //0: left down, //1: right down, //0: y, 1: x static int dd[2][2] = { 1, -1, 1, 1 }; static bool cant_go(int y, int x) { if (y = N) return true; if (x = M) return true; if (board[y][x] == '0') return true; return false; } static int get_len(int y, int x, int dir) { if (cant_go(y, x)) ..
7830
static int N, M; static char board[750][750]; static int visit[750][750][2]; static queue q; //0: left down, //1: right down, //0: y, 1: x static int dd[2][2] = { 1, -1, 1, 1 }; static bool cant_go(int y, int x) { if (y = N) return true; if (x = M) return true; if (board[y][x] == '0') return true; return false; } static int get_len(int y, int x, int dir) { if (cant_go(y, x)) ..
5658
static int N, K; static int muls[] = { 0x1, 0x10, 0x100, 0x1000, 0x10000, 0x100000, 0x1000000 }; static int translator[255]; static long long ans[28]; static void init_translator(void) { char values[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; int v = 0; for (int i = 0; i < sizeof(values) / sizeof(char); i++) translator[values[i]] = v++; } static int cm..
7673
static int N; static int board[1000][1000][4]; // 10의 개수, 2의 개수, 5의 개수, 원래 수 static int table[1000001][4]; //10의 개수, 2의 개수, 5의 개수, hit/miss static bool visit[1000][1000]; static queue q; static int d[2][2] = { 0, 1, //right 1, 0 //down }; static void translation(int n) { int cp = n; int divs[] = { 10, 2, 5 }; if (table[cp][3] || cp == 0) return; for (int i = 0; i < 3; i++) { int cnt = 0; while (..
7730
static int N, M; static int trees[1000000]; static int cmp(const void * p1, const void * p2) { int n1 = *(int *)p1; int n2 = *(int *)p2; return n2 - n1; } static int solution(void) { int H, ret = 0; scanf("%d %d", &N, &M); for (int i = 0; i < N; i++) scanf("%d", &trees[i]); qsort(trees, N, sizeof(int), cmp); int max = trees[0], min = 0; while (min H; i++) sum += (trees[i] - H); if (sum < M) max ..