[프로그래머스] - 프렌즈4블록 (파이썬)
from collections import deque dx = [0, 1, 1] dy = [1, 0, 1] break_block_list = [] def solution(n, m, board): answer = 0 board_t = [[0] * m for _ in range(n)] for i in range(n): for j in range(m): board_t[i][j] = board[i][j] while True: for i in range(n): for j in range(m): if board_t[i][j] != 0: isFour(i, j, board_t, n, m) answer += break_block(board_t, n, m) if not move(board_t, n, m,): break r..
2022. 1. 30.