나의 풀이 n, m = map(int, input().split()) a, b, d = map(int, input().split()) world = [] for _ in range(n): world.append(list(map(int, input().split()))) def turn_left(): global d if d == 0: d = 3 else: d -= 1 def visited(): global world world[a][b] = 2 cnt = 1 turn_cnt = 0 left_types = [[0,-1], [-1,0], [0,1], [1,0]] back_types = [[1,0], [0,-1], [-1,0], [0,1]] visited() while True: tmp_a, tmp_b = a..