![[백준 9920번] image (C++)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FemtxwX%2FbtsyTutSZEN%2FAAAAAAAAAAAAAAAAAAAAAG2gwp0LvVV0leouLJvFOzlM31U1SjJfoDVrMcRBhfBT%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1753973999%26allow_ip%3D%26allow_referer%3D%26signature%3D5Fh3BtmvvxYnpAfQiDexGAKFuRU%253D)
PS/백준 알고리즘[BOJ]2023. 10. 21. 22:07[백준 9920번] image (C++)
//white: 0, black: 1 #define SIZE 64 #include using namespace std; int dat; int cnt; int map[SIZE][SIZE]; // change - true, not change - false bool check(int x1, int y1, int x2, int y2) { dat = map[x1][y1]; for (int i = x1; i < x2; i++) { for (int j = y1; j < y2; j++) { if (dat != map[i][j]) return true; } } return false; } int dc(int size, int x, int y) { if (size == 1) return 2; if (!check(x, ..