u11 update

This commit is contained in:
Maksym Kurets 2026-12-04 22:27:57 +01:00
parent f4204fe698
commit f9c54ee2b4

View File

@ -27,11 +27,6 @@ def maximum_value_with_items(maximum_weight, items):
stav = {0: (0,[])}
for item in items:
w = item["weight"]
v = item["value"]
Novystav = dict(stav)
for item in items:
w = item["weight"]
v = item["value"]
Novystav = dict(stav)
@ -43,7 +38,7 @@ def maximum_value_with_items(maximum_weight, items):
if NewV > Novystav.get(NEwW, (0, []))[0]:
Novystav[NEwW] = (NewV, vibir + [item])
stav = Novystav
stav = Novystav
BV = 0
Bvibir = []