随笔分类 - Ac自动机
摘要:从天上掉下来了个这样的问题: 有一个字符串 从中选出两个子串 A,B,求 A+B可以构成的不同串的个数。 还想知道,这么多个串中字典序最大的那一个。 某人捡到了这个问题,并把它扔给了你。 【输入】 一个全由小写字母构成的字符串。 【输出】 第一行 一个非负整数,表示两个子串A+B可以构成的不同串个数
阅读全文
摘要:#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m,ans,id[505],vis[105000]; char s[255],T[10005]; struct node{ int a[
阅读全文
摘要:#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int n,m,ans,id[505],vis[105000]; char s[255],T[10005]; struct node{ int a[
阅读全文
摘要:#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int size=26,M=1000005; char c[M]; int w[255],n; struct node{ int sum
阅读全文

浙公网安备 33010602011771号