Notice
Recent Posts
Recent Comments
Link
목록Dijkstra (1)
나의 개발일지
문제 : https://www.acmicpc.net/problem/1916 🔑 Dijkstra 알고리즘 import sys from collections import defaultdict from heapq import heappush, heappop input = sys.stdin.readline n = int(input()) # 도시 개수 m = int(input()) # 버스 개수 graph = defaultdict(list) for i in range(m): s, e, c = map(int, input().split()) graph[s].append((c, e)) # 출발지 : [(비용, 도착지)] start, end = map(int, input().split()) INF = int(1e9) c..
백준
2023. 10. 14. 14:33