(boj) 5014 Startlink 파이썬 솔루션
이는 bfs로 해결할 수 있는 문제로, 기존 bfs가 보통 2차원 MAP을 기반으로 하던 문제를 1차원으로 축소한 것이다. 기존 bfs의 검색 방향은 북동 남서 그랬다면 유, 디 에 의해 해결 문제) 설명) import sys input = sys.stdin.readline import collections F, S, G, U, D = map(int,input().split()) def bfs(): q = collections.deque() q.append((S, 0)) visited = (0 … Read more