模板—字符串—后缀自动机(后缀自动机+线段树合并求right集合) Code: #include <bits/stdc++.h> using namespace std; #define N 100010 map <int,int> son[N<<1]; char str[N]; int root[N<<1],pla[N],len; int tot=1,last=1,pre[N<<1],dis[N<<1],in[N<<1]…
Reincarnation Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 843 Accepted Submission(s): 283 Problem Description Now you are back,and have a task to do:Given you a string s consist of lower…