"""
Exercise 1: Shortest distances with Dijkstra

n nodes, directed weighted edges [u, v, w] (w >= 0). Return the list of
shortest distances from src (-1 for unreachable). Use heapq.
"""

def shortest_distances(n, edges, src):
    # TODO
    return [-1] * n


# --- self-check: do not modify below this line ---
got = shortest_distances(6, [[0, 1, 7], [0, 2, 9], [0, 5, 14], [1, 2, 10], [1, 3, 15], [2, 3, 11], [2, 5, 2], [5, 4, 9], [3, 4, 6]], 0)
print(got)
print("PASS" if got == [0, 7, 9, 20, 20, 11] and shortest_distances(2, [], 0) == [0, -1] else "FAIL")
