you're given a set of 'n' rectangular boxes B(i), 1 <= i <= n. the three dimensions of box B(i) are x1(i), x2(i) & x3(i).
your aim is to create a stack (keeping a box on other box) of maximum height. you can keep a box B(i) on box B(j) only when the area of faces in contact (of boxes B(i) & B(j)) holds following property-
face_area_in_contact(B(i)) <= face_area_in_contact(B(j))
find a strategy to get maximum height stack. of course you can rotate the box ...