결과 메모리 123264 KB 시간 116 ms 알게된 것 bfs에서 도중에 return 하는 예시도 연습해봤다. 푼 과정 directions 순서가 방향마다 달라서 getDirections를 만들었다. bfs 처음에 매번 print(a, b) 해서 내가 의도한대로 동작하는지 다 따라가봤다. 역시 직접 해보는게 제일 빠르다! 제출 코드 # 제출 N, M = map(int, input().split()) robotR, robotC, currentD = map(int, input().split()) area = [list( map(int, input().split()) ) for _ in range(N)] directions = [(0, -1), (1, 0), (0, 1), (-1, 0)] # 북 기준 de..