Problem 2: (5 points) There are n cities in the country. Some of them are connected by bus routes and others by train routes. You are given two adjacency lists, GBus[1..n] and GTrain[1..n], where every GBus[i, j] or GTrain[i, j] is a pair of the form (destination, duration). The total number of routes does not exceed m.
It is known that a change from one bus to another or from one train to another takes zero time, and a change between a bus and a train takes one hour.
Design an algorithm that, for a given city v, will compute an array dist[1..n] such that dist[w] is the duration of the shortest journey from v to w.
The complexity of the algorithm should be O((n + m) log n).