[题目大意] 题目将从某点出发的所有最短路方案中,选择边权和最小的最短路方案,称为最短生成树. 题目要求一颗最短生成树,输出总边权和与选取边的编号.[题意分析] 比如下面的数据: 5 5 1 2 2 2 3 2 3 4 16 1 5 18 4 5 2 1 这个图对于从 1 出发,有两种最短路. 这种最短路方案中 dis[2]=2,dis[3]=4,dis[4]=20,dis[5]=18.边权总和 Sum=44 但如果这样选边,1点到各点的距离依然为最短路,但Sum降为了24. 那么如何选择到最优…