[python] 14500. 테트로미노
문제 출처 14500. 테트로미노 풀이 N, M = map(int, input().split()) arr = [list(map(int, input().split())) for _ in range(N)] def others(x, y, visited, sum_): global max_ if len(visited) == 4: max_ = max(max_, sum_) return for dx, dy in (1, 0), (0, 1), (-1, 0), (0, -1): nx, ny = x+dx, y+dy if nx = M or ny = N: continue if (nx, ny) in visited: continue others(nx, ny, visited+[(nx, ny)], ..
2019. 8. 4.