box stacking 问题(From MIT)
问题:
You are given a set of n types of rectangular 3-D boxes, where the i^th box has height h(i), width w(i) and depth d(i) (all real numbers). You want to create a stack of boxes which is as tall as possible, but you can only stack a box on top of another box if the dimensions of the 2-D base of the lower box are each strictly larger than those of the 2-D base of the higher box. Of course, you can rotate a box so that any side functions as its base.
限制条件,每个box只准使用一次,求的是使用这些box,可以组成最高的stack是多高?
如果没中box无限次使用是经典的动态规划,sort + LIS 就可以解决,但是只准使用一次如何解?