Data update
This commit is contained in:
parent
72eb4943cb
commit
4d5544505c
2347 changed files with 62432 additions and 16731 deletions
|
|
@ -6,7 +6,7 @@ maxweight = 400
|
|||
#
|
||||
global valuesum[] maxv .
|
||||
#
|
||||
proc solve i maxw v . items[] wres vres .
|
||||
proc solve i maxw v &items[] &wres &vres .
|
||||
if i = 0
|
||||
wres = 0
|
||||
vres = 0
|
||||
|
|
@ -31,13 +31,11 @@ proc solve i maxw v . items[] wres vres .
|
|||
.
|
||||
.
|
||||
.
|
||||
proc prepare . .
|
||||
for i to len weight[]
|
||||
for j to pieces[i]
|
||||
n$[] &= name$[i]
|
||||
w[] &= weight[i]
|
||||
v[] &= value[i]
|
||||
.
|
||||
proc prepare .
|
||||
for i to len weight[] : for j to pieces[i]
|
||||
n$[] &= name$[i]
|
||||
w[] &= weight[i]
|
||||
v[] &= value[i]
|
||||
.
|
||||
swap name$[] n$[]
|
||||
swap weight[] w[]
|
||||
|
|
@ -63,6 +61,4 @@ prepare
|
|||
solve len weight[] maxweight 0 items[] wsum vsum
|
||||
print "weight: " & wsum & " value: " & vsum
|
||||
print "items:"
|
||||
for item in items[]
|
||||
print " " & name$[item]
|
||||
.
|
||||
for item in items[] : print " " & name$[item]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue