合集-字符串

摘要:马拉车算法 struct Manacher { int n, huiwen_mx; string s, str; vector<int> d; Manacher(string &str_) { str = str_; n = str.size(); get_d(); get(); } inline 阅读全文
posted @ 2024-09-10 10:49 grape_king 阅读(19) 评论(0) 推荐(0)
摘要:\(KMP\) 算法 阅读全文
posted @ 2024-09-10 10:50 grape_king 阅读(19) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; using i64 = long long; const i64 mod = 998244353; const int N = 2e6 + 5; const int M = 1e6 + 5; int sa[N 阅读全文
posted @ 2025-06-13 23:57 grape_king 阅读(9) 评论(0) 推荐(0)
摘要:后缀自动机 \((\text{SAM})\) 题单链接:luogu #include <bits/stdc++.h> using namespace std; using i64 = long long; const int N = 3000005; void init() { } int tot, 阅读全文
posted @ 2025-11-01 23:21 grape_king 阅读(5) 评论(0) 推荐(0)