예전엔 어려웠지만.. 이젠 위상정렬.. 쉬운걸? ez 원큐에 짜서 원큐에 통과. 기분좋다. import sys input = sys.stdin.readline from collections import deque def topological_sorting(): queue = deque() for i in range(1,N+1): if not level[i]: queue.append(i) dp_times[i] = times[i-1] while queue: cur_node = queue.popleft() if cur_node == W: return for next_node in graph[cur_node]: dp_times[next_node] = max(dp_times[cur_node]+times[next_..