[백준 파이썬] 5014번 스타트링크
https://www.acmicpc.net/problem/5014 5014번: 스타트링크 첫째 줄에 F, S, G, U, D가 주어진다. (1 ≤ S, G ≤ F ≤ 1000000, 0 ≤ U, D ≤ 1000000) 건물은 1층부터 시작하고, 가장 높은 층은 F층이다. www.acmicpc.net import sys from collections import deque input = sys.stdin.readline f, s, g, u, d = map(int, input().split()) visited = [0]*(f+1) q = deque() q.append(s) visited[s] = 1 while q: current = q.popleft() if current == g: break for n i..