【ZOJ3949 The 17th Zhejiang University Programming Contest B】【树形DP】Edge to the Root 树上加一边 根距离之和尽可能小
EdgetotheRootTimeLimit:1SecondMemoryLimit:131072KBGivenatreewithnvertices,wewanttoaddanedgebetweenvertex1andvertexx,sothatthesumofd(1,v)forallverticesvinthetreeisminimized,whered(u,v)istheminimumnumbe