From: Karl von Laudermann Date: 2005-06-30T05:50:41+09:00 Subject: Re: Programmers Contest: Fit pictures on a page marcus baker wrote: > It'd be pretty facetious resizing the images - I mean, if you're going > to resize at all just to win you might as well just every image to one > or two pixels squared and fit it on the paper. > > The point of the sport is obviously to stick with the original, > unresized images of arbitrary dimensions and coming up with an > algorithm to conserve as much canvas as possible laying them down. But that doesn't make sense either; if all pictures remain at their original size, then all possible solutions will have the same amount of leftover space. That is, the amount of leftover space will be equal to the area of the page minus the sum of the areas of all of the pictures, regardless of how they're arranged. And what if a particular picture is to big to fit on the page at all? Randy was right, the problem is poorly defined. > On Wednesday 29 June 2005 10:30 am, hicinbot...@ems.att.com wrote: > > The summer POTM challenges you to write a program that will place up to > > 26 pictures on a sheet of paper with the least amount of leftover > > space. > Do you want to constrain the solutions a little more? A trivial solution that > wastes no paper (regardless of paper size) is to print 2 rows of 13 pictures, > and resize each picture to fit in that space. > Randy Kramer