위상 정렬1 [Python] 백준 1948번 - 임계경로 문제백준 1948번최종 코드import sysfrom collections import dequeinput = sys.stdin.readlinen = int(input())m = int(input())routes = [[] for _ in range(n + 1)]degree = [0] * (n + 1)reversed_routes = [[] for _ in range(n + 1)]max_time = [0] * (n + 1)for _ in range(m): s, e, t = map(int, input().split()) routes[s].append((e, t)) degree[e] += 1 reversed_routes[e].append((s, t))start, end = map(int,.. 2024. 5. 15. 이전 1 다음