#95. [백준_C언어] 1780 : 종이의 개수 \ 분할 정복
입력 코드 #include #define MAX 2187 #define TRUE 1 #define FALSE 0 int arr[MAX][MAX]; int count[3]; int checkbox(int x, int y, int w, int color) { for (int i = 0; i < w; i++) for (int j = 0; j < w; j++) if (arr[x + i][y + j] != color) return FALSE; return TRUE; } void splitbox(int x, int y, int w) { if (checkbox(x, y, w, arr[x][y])) count[arr[x][y] + 1]++; else for (int i = 0; i < 3; i++) for (int j..