From: Robert Retzbach Date: 2006-01-14T00:26:41+09:00 Subject: Re: [QUIZ] Packing (#62) Ruby Quiz schrieb: >The three rules of Ruby Quiz: > >1. Please do not post any solutions or spoiler discussion for this quiz until >48 hours have passed from the time on this message. > >2. Support Ruby Quiz by submitting ideas as often as you can: > >http://www.rubyquiz.com/ > >3. Enjoy! > >Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone >on Ruby Talk follow the discussion. > >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > >by Ilmari Heikkinen > >You're moving. And that means a whole bunch of boxes need to be moved from the >old place to the new one. You've got a pickup truck to do the moving, but it can >only hold one vertical level of boxes. The boxes need to be padded with one unit >worth of foam on each side that's facing another box. > >The goal is to minimize the amount of trips you have to do to move all the >boxes. > >The solver program should take two lines of input, first one containing the >trunk dimensions (e.g. 10x20), and the second one containing all the box >dimensions, separated by spaces (e.g. 1x3 4x8 3x7 9x4 10x14.) > >The output of the solver should be ascii art of the trunk packings, with each >trunkful separated by an empty line. > > Example: > $ ruby solver.rb > 10x20 > 1x3 4x8 3x7 9x4 10x14 > > **************.***.. > **************...... > **************.****. > **************.****. > **************.****. > **************.****. > **************.****. > **************.****. > **************.****. > **************.****. > > *********........... > *********........... > *********........... > *********........... > .................... > *******............. > *******............. > *******............. > .................... > .................... > > > > Hello, this is a interesting quiz, but I am still in the middle to understand the last! :D However... I can't access ruby62.html. It's always rewritten to ruby26.html. Maybe I stand alone with this problem. MfG Retze