On examination of the stomach extreme discomfort, then knock the two drugs, considered to deal with special situations? ?
T1 discovered the circulation of the A section that, more than push a property may be a better realization,
T2 knapsack problem, especially counsels comparison is not entirely backpack
T3lca done no violence yards deep thinking
T1
To reduce the amount of read is a lie. . With the mod can be easily found to be a section cycle, simply requires lis circulating section
So easy to prove, there must be constant end sequence belongs to the best case (anyway Act)
But not all sections of curling up in a cycle, because there will be some cases in the first few cycles selected section, then continuous unchanged
Dp so the first run of a len × len (len cycle length)
T2
gugu
T3
Consider all the points x point from white to black, then w [x] You can update its sub-tree, and that the other point of it?
For a parent node of x f, where x is provided subtree g, the w [f] may be updated subtree (f) -subtree (g)
But we found that if subtree (f) an update has occurred,
Then for f fa ancestor node, the update before the point, and the point is now updated completely equivalent,
So no need to proceed any longer