A routing service stores a road network as a directed graph with positive travel times. Return the cheapest route from a source to a target, together with its cost.
Write shortest_route(n, edges, source, target) that returns a tuple (cost, path):
n: number of nodes, labelled 0 to n - 1.edges: a list of [u, v, w] meaning a directed edge from u to v with integer weight w >= 1. Parallel edges and self-loops may appear.cost: the smallest total weight of any path from source to target, or -1 if target is unreachable.path: the list of nodes on a cheapest path, starting with source and ending with target, or [] if unreachable. If several cheapest paths exist, return the one whose node list is lexicographically smallest (compare the lists element by element, as Python compares lists).source == target the answer is (0, [source]).