If (s>w) then v=−oo since we use more than what the bag can hold. If (i≥n) then v=0 since there is no available item, so no weight added into the bag.
確定! 回上一頁