Problem 3647 · Medium

Maximum Weight in Two Bags

Track every pair of bag loads that can be reached, then keep the pair with the largest total.

Open the interactive visualisation