Dijkstra's Shortest Paths

Enter three integers separated by spaces that give the number of vertices, number of directed edges, and a source vertex for a graph, respectively. A random weighted digraph with these parameters will be created and the tree of shortest paths back to the source vertex will be created in accordance with Dijkstra's algorithm.