#Q70. 「一本通 3.1 练习 3」秘密的牛奶运输
「一本通 3.1 练习 3」秘密的牛奶运输
Description
Farmer John needs to transport his milk to various sales points. During transportation, the milk can first be sent to some sales points and then distributed from there to other sales points. The smaller the total transportation distance, the lower the cost. Farmer John aims for low-cost transportation, but he doesn't want his competitors to know his specific transportation plan, so he prefers to use the second smallest cost transportation plan instead of the smallest. Now, please help find this transportation plan.
Input Format
The first line contains two integers, and , representing the number of vertices and edges, respectively.
Each of the next lines contains three integers, , , and , indicating the two endpoints , of a road and the distance between them.
Output Format
Output only one line, the second smallest transportation plan.
Sample 1
4 4
1 2 100
2 4 200
2 3 250
3 4 100
450
Data Range and Hints
For all data, , , . The data may contain duplicate edges.