Light Mode
Dark Mode
Brute force implementation

My question is about task "Loading Cargo" (http://www.checkio.org/mission/task/info/loading-cargo/)

I've tried to tackle this problem with both greedy and differencing method, but I get stuck on a 5th and 6th example respectively, so I'm currently trying to implement the brute force solution for this problem. I don't have experience with itertools, so I have to ask for help. I don't know how to make combinations output result in two different or lists, which I will then sum independently and substract one from another to find the lowest discrepancy. Or should I use permutations?

Any hint is appreciated, thanks.

Created: July 18, 2013, 7:07 a.m.
Updated: Sept. 30, 2013, 1:47 p.m.
0
12
User avatar
Reloader