Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
解法://DP,给定一个字典和序列,问序列中有多少种单词组合的可能 //首先先将单词转化成译码 //对于一组序列遍历一遍,对于dp[i],若发现此处有此前到达的路径,那么枚举每个单词,看是否能够组成一个新的,若能 //则dp[i+len]+=dp[i]把组合累加,最后只需要输出dp[lens]即可 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator