
后缀自动机【SAM】
poursoul
这个作者很懒,什么都没留下…
展开
-
【POJ】1509 Glass Beads 【后缀自动机】
传送门:【POJ】1509 Glass Beadsmy code:#include #include #include #include using namespace std ;typedef long long LL ;typedef unsigned long long ULL ;typedef pair pii ;#define rep( i , a原创 2015-04-21 16:05:38 · 1116 阅读 · 0 评论 -
【HDU】5343 MZL's Circle Zhou【后缀自动机】
传送门:【HDU】5343 MZL’s Circle Zhou对于a串可能和b串重复的部分,我们总能找到一个位置,使得a串达到最长,即a串的后继为空,所以我们只要预处理以字符x为开头的b串的个数即可。my code:my~~code:#include <bits/stdc++.h>using namespace std ;typedef long long LL ;#define clr( a原创 2015-08-05 22:13:08 · 1530 阅读 · 0 评论 -
【HDU】5470 Typewriter 【后缀自动机+dp】
传送门:【HDU】5470 Typewritermy code:my~~code:#include <bits/stdc++.h>using namespace std ;typedef long long LL ;#define clr( a , x ) memset ( a , x , sizeof a )const int MAXN = 100005 ;const int N = 26原创 2015-09-29 22:20:29 · 1852 阅读 · 1 评论