Codeforce Round #424E Colored Jenga

来源:互联网 发布:php网页制作教程 编辑:程序博客网 时间:2024/05/20 04:15

题目来源::http://codeforces.com/problemset/problem/424/E

题目大意:一个木块塔,每层有三个长条木块组成,有各自的颜色,同时还有手头还有一颗特殊的骰子。

操作细节:1. 每分钟仍次骰子,必须冲塔中抽出一块相应颜色的长条木块。

                    2. 如果上述做不到,这分钟就一直等。

                    3. 从top层抽出木块是不被允许的。

                    4. 一旦抽出了,那么这木块必须放顶上,即形成新的一层;或者放在最上面那行。

                    5. 结束条件:任意一块抽出都要倒。

                    6. 操作者本身是冲着尽快结束的策略去的,If a player acts optimally well, then at any moment he tries to choose the block he takes out so as to minimize the expected number of the game duration.不知道这样理解对不对。

题目提示:A classical DP-problem on finding expected number. The only problem is to find how to encode the state. To reduce the number of states we can assume that there is only 18 different type of levels, but not 27. For better time-performance it is better to use hashing.

待续。。。

可能也没待续了。。。

0 0