sort1 BOJ/2583 영역 구하기 #define _CRT_SECURE_NO_WARNINGS #include #include #include int arr[101][101]; int col, row, n; int count; int bound(int i, int j) { if (i >= 0 && i = 0 && j < row) { return 0; } else { return -1; } } void clear(int i, int j) { arr[i][j] = 1; count++; if (bound(i + 1, j) == 0) { if (arr[i + 1][j] == 0) { clear(i + 1, j); } } if (bound(i - 1, j) == 0) { if (arr[i - 1][j] == 0) {.. 2024. 1. 28. 이전 1 다음