똑같이 분할정복. 출력 방식만 다름 import sys input = sys.stdin.readline def check(n,s_x,s_y): pivot = matrix[s_x][s_y] for i in range(s_x,s_x+n): for j in range(s_y,s_y+n): if matrix[i][j] != pivot: return False return True def compress_video(n,s_x,s_y): pivot = n//2 if n==1: q_tree.append(str(matrix[s_x][s_y])) return if check(n,s_x,s_y): q_tree.append(str(matrix[s_x][s_y])) return q_tree.append('(') for i i..