摘要: 题意:求A 串中不在 所有B串中出现大不同子串的个数分析:后缀数组可以很简单的实现求一个串不同字子串的个数,,从这方面下手就很容易想到了,之前比赛的时候,,死活没想法先将所有串拼接起来,计算不包含分隔符的不同子串的个数sumAB,再单独将所有B串拼接起来,同样的方法求一遍,得到sumB,sumAB-sumB即为所求View Code #include <iostream>#include <algorithm>#include <string.h> #include <math.h>#include <string>int const 阅读全文
posted @ 2012-10-08 00:04 枕边梦 阅读(313) 评论(0) 推荐(0) 编辑