3 ms·
You can read the chart backwards to get an answer. Check 2 vs 3 @4lb. That's constant so 3 is not in there. Check 1 vs 2 @4lb. It changes so ob2 is in there.
by Retric 12y ago
You can read the chart backwards to get an answer.
Check 2 vs 3 @4lb. That's constant so 3 is not in there.
Check 1 vs 2 @4lb. It changes so ob2 is in there. Now 3 weighs 2lb so look at 4lb - 2lb(ob3) = 2lb max weight.
Check 0 vs 1@2lb. That's increasing so object 1 is in there 2lb - 1lb (ob1) = 1lb max.
Check 0 @1lb that's greater than zero so object 0 is also in there.
Thus, the solution is objects 0,1,2 but not 3.
PS: Note, this only finds one solution there might be several. You can quickly find them with this chart but it's somewhat more complex. You would be looking for places where the max value does not change from the previous row, but the max value in the same row - the object weight = the max value - the object value.