
后缀自动机
huanzhizun
这个作者很懒,什么都没留下…
展开
-
SAM
#include #include #include #include using namespace std; typedef long long LL; inline LL C2(LL x){ return (x * (x - 1)) >> 1; } const int ALB = 26; const int MAXN =1000005; int N; int arr[MAXN原创 2016-02-24 19:49:38 · 344 阅读 · 0 评论 -
NOI2015品酒大会
跑一遍SAM,然后建一棵线段树,维护最大值和出现次数即可。 #include #include #include #include using namespace std; typedef long long LL; inline LL C2(LL x){ return (x * (x - 1)) >> 1; } const int ALB = 26; const int max原创 2016-02-24 22:48:56 · 630 阅读 · 0 评论