Problem D. Victor and World
时间限制 2000 ms
内存限制 128 MB
After trying hard for many years, Victor has finally received a pilot license. To have a celebration, he intends to buy himself an airplane and fly around the world. There are $n$ countries on the earth, which are numbered from $1$ to $n$. They are connected by $m$ undirected flights, detailedly the $i$-th flight connects the $u_i$-th and the $v_i$-th country, and it will cost Victor's airplane $w_i$ L fuel if Victor flies through it. And it is possible for him to fly to every country from the first country.
Victor now is at the country whose number is $1$, he wants to know the minimal amount of fuel for him to visit every country at least once and finally return to the first country.
输入数据
输出数据
Your program should print $T$ lines : the $i$-th of these should contain a single integer, denoting the minimal amount of fuel for Victor to finish the travel.
样例输入
样例输出
$ Mathjax font initiator $