Notice
Recent Posts
Recent Comments
Link
목록1753 (1)
나의 개발일지
문제 : https://www.acmicpc.net/problem/1753 🔑 기본 다익스트라 출발지에서 모든 노드까지의 거리를 출력 자신의 위치 0 출력 갈 수 없으면 INF 출력 출력 신경쓸 필요 없이 그냥 다익스트라 실행하고 1번 노드부터 순서대로 출력하면 그대로 나옴 INF 값만 따로 처리 from collections import defaultdict from heapq import heappush, heappop import sys input = sys.stdin.readline V, E = map(int, input().split()) # 노드의 개수, 간선의 개수 start = int(input()) # 시작 노드 graph = defaultdict(list) for i in range(E..
백준
2023. 10. 20. 19:47