给出一个字符串的序The coding system works like this: • The words are arranged in the increasing order of their length. • The words with the same length are arranged in lexicographical order (the order from the dictionary). • We codify these words by their numbering, starting with a, as follows: a - 1 b - 2 ... z - 26 ab - 27 ... az - 51 bc - 52 ... vwxyz - 83681 ... 然后给出一个字符串,要求求在字典中的位置。设状态dp[l][p]为长度为l的字符串且以p为字母开头的个数为多少。dp[l][p]=sum{dp[l-1][i]} i>k下面就不用解释了吧- -
posted on 2010-10-28 00:58 yzhw 阅读(97) 评论(0) 编辑 收藏 引用 所属分类: DP
Powered by: C++博客 Copyright © yzhw