摘要:
"题目链接" 论找到一个好的教程的正确性。。 "后缀数组" 下标从1编号: cpp //299ms 2560kb include include include const int N=1e5+5; int n,sa[N],rk[N],sa2[N],tm[N],ht[N]; char s[N]; v 阅读全文
摘要:
"题目链接" cpp //删掉一个单词需要前移一段位置,用链表维护就好了 复杂度O(sum(len)) include include define S 26 const int N=1e5+7; int n; char s[N],p[N]; struct AC_Automaton { int cn 阅读全文
摘要:
"题目链接" $Description$ 求给定字符串中 最长的k个回文串长度的乘积(要求回文串长度为奇数);若奇数长度回文串不足k个则输出 1.(len include define rg register define mod 19930726 typedef long long LL; con 阅读全文
摘要:
"题目链接" 建边不说了。对于议案'?'的输出用拓扑不好判断,直接对每个议案的结果DFS,看是否会出现矛盾 Tarjan也用不到 cpp //964kb 76ms include include include const int N=2005,M=16005; int n,m,Enum,H[N], 阅读全文
摘要:
题目链接 以下转自:zck921031. \(Description\) 有一个大小为N的集合$S={x_1,x_2,....,x_n}$,\(x_i=0或1\),给出它们之间的一些逻辑运算的结果(如x1 and x2=1),逻辑运算有AND OR XOR三种,问是否存在一种满足所有条件的取值方案。 阅读全文