摘要: AC自动机和DP。 f[i][j] 表示在匹配到第i位置,处于ac自动机的j节点。决策第(i+1)个字母,计算出转移到第j2节点。 f[i+1][j2] += f[i][j]; #include #include #include using namespace std; const int maxl = 100 + 10; const int maxn = 6000; const i... 阅读全文
posted @ 2016-04-15 20:17 invoid 阅读(244) 评论(0) 推荐(0) 编辑