Problem 2440 · Hard

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.

Open the interactive visualisation