2019.03.12) 백준 최단경로 특집 1편 - 1753(PyPy3)
우선순위 큐 사용했다.파이썬한테 불리한 문제라 혼났다.12345678910111213141516171819202122232425262728293031323334353637from heapq import heappush, heappop V, E = map(int, input().split(' ')) K = int(input()) graph = {i: list() for i in range(1, V + 1)} for i in range(E): u, v, w = map(int, input().split(' ')) graph[u].append((v, w)) # 무한대를 이렇게 구현해보았다.check = {i: 'INF' for i in range(1, V + 1)}check[K] = 0pq = list()hea..
2019.03.12