树结构,Link-Cut-Tree

Sorry, there is no problem in the problem set