Create Components With Same Value
Try each component count that divides the total, and test with a bottom-up pass that cuts a subtree as soon as it sums to the target.
Try each component count that divides the total, and test with a bottom-up pass that cuts a subtree as soon as it sums to the target.