There is a tree with nnn vertices and kkk weighted paths. The following operations are required to be supported: Operation 0: delete the path with the smallest weight in the remaining. Operation 1: given a vertexxxx, ask for the minimum weight among all the weighted paths that do not intersect withxxx. A path (u,v)(u,v)(u,v) intersects with xxx if and only if xxx is one of the vertices in the shortest path from uuu to vvv .
There is a tree with nnn vertices and kkk weighted paths. The following operations are required to be supported: Operation 0: delete the path with the smallest weight in the remaining. Operation 1: given a vertex xxx, ask for the minimum weight among all the weighted paths that do not intersect with xxx. A path (u,v)(u,v)(u,v) intersects with xxx if and only if xxx is one of the vertices in the shortest path from uuu to vvv (including uuu and vvv).
(图片来源网络,侵删)