Possible Predecessors on Shortest Paths
The country Hackerland is a connected graph with n cities (nodes, numbered 1..n) and m bidirectional roads (edges) with positive integer lengths. Packages are delivered from the capital city u to othe...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
