Softeer: 로봇이 지나간 경로
import sys import collections H, W = map(int, sys.stdin.readline().split()) grid = [] num_cell = 0 for _ in range(H): line = list(sys.stdin.readline()) num_cell += line.count('#') grid += line, rows = len(grid) cols = len(grid[0]) start_pos = [] for y in range(rows): for x in range(cols): if grid[y][x] == '#': start_pos += (y, x), # 0: N, 1: S, 2: W, 3: E dirs = [(-1, 0), (1, 0), (0, -1), (0, 1)..
2021.10.15