摘要:
oj有对应课件 后缀自动机 #include<bits/stdc++.h> using namespace std; struct jade { int w[27]; long long link,len,val; }sam[2000010]; vector <int> t[2000010]; st 阅读全文
posted @ 2025-07-28 16:23
BIxuan—玉寻
阅读(14)
评论(0)
推荐(1)
摘要:
AC自动机 代码 #include<bits/stdc++.h> using namespace std; int fail[1000010],t[1000010][30],tot,cnt[1000010]; void add(string s) { int root=0; for(int i=0; 阅读全文
posted @ 2025-07-28 08:04
BIxuan—玉寻
阅读(16)
评论(0)
推荐(1)
摘要:
哈希 定义 hash方式 hash公式 单hash方法 双hash方法 获取子串的hash 代码 #include<bits/stdc++.h> using namespace std; char s1[1000010],s2[1000010]; unsigned h2[1000010],p2[10 阅读全文
posted @ 2025-07-28 07:47
BIxuan—玉寻
阅读(23)
评论(1)
推荐(1)

浙公网安备 33010602011771号