<백준> 1992번 파이썬 알고리즘 [분할 정복]
import sys n = int(sys.stdin.readline()) arr = [] for _ in range(n): arr.append(list(map(int, input()))) def divide(x, y, n): check = arr[x][y] for i in range(x, x + n): for j in range(y, y + n): if check != arr[i][j]: check = -1 break if check == -1: print('(', end="") n = n//2 divide(x, y, n) divide(x, y + n, n) divide(x + n, y, n) divide(x + n, y + n, n) print(')',end="") elif check == 0: pri..