PS/백준 알고리즘[BOJ]2023. 10. 21. 15:49[백준 1992번] 쿼드트리 (C++)
//white: 0, black: 1 #define SIZE 64 #include #include #include using namespace std; char col; char map[SIZE][SIZE]; // change - true, not change - false bool check(int x1, int y1, int x2, int y2) { col = map[x1][y1]; for (int i = x1; i < x2; i++) { for (int j = y1; j < y2; j++) { if (col != map[i][j]) return true; } } return false; } void dc(int size, int x, int y) { if (size == 1) { cout str; ..