摘要: 8.30HDU 3336Count the string用dp[i]表示以第i个字符结尾的与前缀相同的串数。转移:dp[i]=dp[Next[i]]+1。答案即为所有dp求和。 1 # include 2 # include 3 using namespace std; 4 int m,Next... 阅读全文
posted @ 2015-08-30 08:18 Aguin 阅读(205) 评论(0) 推荐(0) 编辑