Dynamic Dynamic Programming (DDP): Heavy-Light Decomposition & Matrix Segment Trees on Trees
Master Dynamic Dynamic Programming (DDP). Combine Heavy-Light Decomposition (HLD) and (max, +) tropical matrix multiplication to answer online tree DP queries in O(log^2 N).