Given below is an undirected weighted connected graph:
Find a minimum spanning tree in the graph using Prim's algorithm. Print your answer to the field below in the following format:
13
0 1
1 2
2 3
The number in the first line is the total weight of a minimum spanning tree, the remaining lines are edges, each on a separate line.