摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2065思路:递推:dp[len][0]表示长度为len的全部合法字符串的个数;dp[len][1]表示长度为len的,仅有A出现奇数次的字符串的个数;dp[len][2]表示长度为len的,仅有C出现奇数次的字符串的个数;dp[len][3]表示长度为len的,A,C均出现奇数次的字符串的个数。于是我们可以得到下列方程:dp[len][0]=2*dp[len-1][0]+dp[len-1][1]+dp[len-1][2];dp[len][1]=dp[len-1][0]+2*dp[len-1][1]+ 阅读全文
posted @ 2013-06-11 00:15 ihge2k 阅读(274) 评论(0) 推荐(0) 编辑