u11 update

This commit is contained in:
Maksym Kurets 2026-12-04 22:14:36 +01:00
parent 93ad1b43d6
commit 4b1bdcd29b

View File

@ -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: