我需要编写,将采取文件的列表(有些大,有些小)和适合他们DVD上(或CD,或其他)尽可能高效地应用。此应用程序的整点移动到第三盘,等前移动到第2盘,填补了第2盘起来尽可能之前,使用尽可能多第一盘。
I need to write an application that will take a list of files (some large, some small) and fit them onto DVDs (or CDs, or whatever) as efficiently as possible. The whole point of this application is to use up as much of the 1st disc before moving onto the 2nd disc, filling the 2nd disc up as much as possible before moving onto the 3rd disc, etc.
(注:应用程序没有做实际的刻录到DVD,它只是找出最佳拟合)
(Note: The application doesn't have to do the actual burning to the DVD, it just has to figure out the best possible fit).
我最初以为我通过生成的文件的排列,然后检查每个组合,看看有什么适合最好有一个很好的游戏计划。 (我对这个帮助请求,可以发现的这里)
I initially thought I had a good game-plan by generating a permutation of the files and then checking each combination to see what fits the best. (My request for help on this can be found HERE)
但更多的文件也有,时间越长...指数。所以,我想要一些关于如何最好地实现这个您的意见。
But the more files there are, the longer it takes... exponentially. So I wanted some of your opinions on how to best achieve this.
任何想法? ,并一如既往,C#代码总是赞赏
Any ideas? And, as always, C# code is always appreciated.
推荐答案简单的算法:
更多推荐
C#代码以适应文件的地段到DVD尽可能高效地
发布评论