Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Loading Cargo by libralibra
def checkio(data):
sd = sum(data) # all sum
std = sorted(data) # sort items
sm = chk(sd/2,std) # find the biggest value
return sd-sm-sm # find the max_half-min_half
# 0-1 knapsack solution
def chk(v,s): # value, item
if len(s)==0 or v
July 8, 2013