紧凑型重presentation包装矩形 [英] Packing rectangles for compact representation

查看:153
本文介绍了紧凑型重presentation包装矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找指向以下问题的解决方案:我有一组矩形,其高度是已知的,X位置也和我想收拾他们在更紧凑的形式。随着一点点的图纸(所有矩形的宽度都相同,但宽度可以在现实生活中发生变化),我想,而不是。

I am looking for pointers to the solution of the following problem: I have a set of rectangles, whose height is known and x-positions also and I want to pack them in the more compact form. With a little drawing (where all rectangles are of the same width, but the width may vary in real life), i would like, instead of.

-r1-
  -r2--
     -r3--
       -r4-
        -r5--

像。

-r1-  -r3-- 
  -r2-- -r4-
         -r5--

所有暗示将AP preciated。我不一定要找的最佳解决方案。

All hints will be appreciated. I am not necessarily looking for "the" best solution.

推荐答案

上衣codeR 有竞争,解决了3D版本的问题。获胜者讨论他的做法<一href="http://www.top$c$cr.com/longcontest/?module=Static&d1=match_editorials&d2=intel_mtcs_6"相对=nofollow>此处,它可能是一个有趣的阅读你。

Topcoder had a competition to solve the 3D version of this problem. The winner discussed his approach here, it might be an interesting read for you.

这篇关于紧凑型重presentation包装矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆