u11 update
This commit is contained in:
parent
93ad1b43d6
commit
4b1bdcd29b
@ -25,13 +25,12 @@ def maximum_value_with_items(maximum_weight, items):
|
||||
return 0, []
|
||||
|
||||
stav = {0: (0,[])}
|
||||
|
||||
|
||||
for item in items:
|
||||
w = item["weight"]
|
||||
v = item["value"]
|
||||
Novystav = dict(stav)
|
||||
|
||||
for currW,(currV, vibir) in stav.items():
|
||||
|
||||
for currW,(currV, vibir) in stav.items():
|
||||
NEwW = currW + w
|
||||
if NEwW <= maximum_weight:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user