So two of them got together ...
How to say, write is P party style C + +, short also not short to where to go, run up also unpleasant, constant big become dog OTL
Bzoj 1036 Tree Chain classic problem bar, point modification + Road after inquiry
"Code"
Bzoj 2243 Path modification + path inquiry
"Code"
Bzoj 3083 Path modification + subtree inquiry (root variable), the problem is to use a tree chain to find the value of a certain interval in the DFS sequence (Dfs sequence can be looked up subtree, the link can modify the path, the combination of the line)
"Code"
Bzoj 2049 using LCT to maintain forest morphology
"Code"
Bzoj 2631 Path Modification + path Inquiry + morphological variable
This problem is just beginning to use an array to write, and then run well slow ... Then I wrote the LCT of the pointer version, found that running slower, even AC is not qaq
It's too weak, Qaq.
Array Version "code" pointer write residual version "code"
Bzoj 2002 is also a mere maintenance of the tree form on the line. This problem can also be written static block linked list, the result LCT run even faster ...
"Code"
Data structure • Tree-chain split +LCT