Problem 1161. Binpack Contest: Retro
The Full Binpack Rules and examples.
This Challenge is a replay opportunity of the First Matlab Contest, 1998 BinPack.
Brief Challenge statement: Pack a 45(mediaLength) minute CD as maximally as possible given a list of songs of varying lengths. No penalty for unused songs. No song duplication allowed. Return the indices of the songs used.
Input: [songList, mediaLength]
Output: indexList
Example:
Input: [ 0.5 2 3 1.5 4], [5.6]
Output: [4 5] as 1.5+4 is very near and below 5.6.
The answer of [1 2 3] is also valid and also gives 5.5.
Scoring: 150*Gap/(12*45)+Time*3 (cases are repeated 100 times to get a time)
Warning: Matlab 2013B may produce time slowing error messages versus 1998 code.
Solution Stats
Problem Comments
-
5 Comments
the test cases provided are too large for the server to handle.
Running the 12 cases 100 times each consumes only .52 seconds. Part of Challenge is managing depth of search. Perfect does not exist.
got your point. Only .52 sec for 12 cases 100 times? wow.
Usage of bintprog. I see per ver that Optimization Toolbox exists but a little digging gave Error: License checkout failed.
License Manager Error -5
Note - The test suite doesn't check for the actual solution.
Solution Comments
Show commentsProblem Recent Solvers12
Suggested Problems
-
Find the peak 3n+1 sequence value
2498 Solvers
-
187 Solvers
-
Make a random, non-repeating vector.
9272 Solvers
-
Find the solution of algebraic equation
52 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1072 Solvers
More from this Author308
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!