[프로그래머스] 프렌즈4블록 (Python)
💁🏻 나의 풀이 def solution(m, n, board): answer = 0 remove_list = set() vectors = [(0, 1), (1, 0), (1, 1)] board = list(map(list, zip(*board))) while True: for x in range(n - 1): for y in range(m - 1): idxs = [(x, y)] c = board[x][y] for v in vectors: if board[x + v[0]][y + v[1]] and c == board[x + v[0]][y + v[1]]: idxs.append((x + v[0], y + v[1])) if len(idxs) == 4: remove_list.update(idxs) if len(r..
2022.10.01