P3574 [POI 2014] FAR-FarmCraft
Description
In a village called Byteville, there are $n$ houses connected with $n-1$ roads.
For each pair of houses, there is a unique way to get from one to another.
The houses are numbered from 1 to $n$.
The house no. 1 belongs to the village administrator Byteasar.
As part of enabling modern technologies for rural areas framework, $n$ computers have been delivered to Byteasar's house.
Every house is to be supplied with a computer, and it is Byteasar's task to distribute them.
The citizens of Byteville have already agreed to play the most recent version of FarmCraft (the game) as soon as they have their computers.
Byteasar has loaded all the computers on his pickup truck and is about to set out to deliver the goods.
He has just the right amount of gasoline to drive each road twice.
In each house, Byteasar leaves one computer, and immediately continues on his route.
In each house, as soon as house dwellers get their computer, they turn it on and install FarmCraft.
The time it takes to install and set up the game very much depends on one's tech savviness, which is fortunately known for each household.
After he delivers all the computers, Byteasar will come back to his house and install the game on his computer.
The travel time along each road linking two houses is exactly 1 minute, and (due to citizens' eagerness to play) the time to unload a computer is negligible.
Help Byteasar in determining a delivery order that allows all Byteville's citizens (including Byteasar) to start playing together as soon as possible.
In other words, find an order that minimizes the time when everyone has FarmCraft installed.
Input Format
N/A
Output Format
N/A
Explanation/Hint

给一棵树,走过每条边需要花费一个时间,安装软件又需要花费一个时间,需要遍历整棵树并回到起点,想让所有点中到达时间+安装时间的最大值最小,问这个值是多少