
【数据结构】回文自动机与回文树
文章平均质量分 88
cz_xuyixuan
这个作者很懒,什么都没留下…
展开
-
【CodeForces】CodeForces Round #463 (Div. 1 + Div. 2) 题解
【比赛链接】点击打开链接【题解链接】点击打开链接【A】Palindromic Supersequence【思路要点】将字符串正反各打印一遍。时间复杂度\(O(|A|)\)。【代码】#include<bits/stdc++.h> using namespace std; const int MAXN = 5005; template <typename T> void rea...原创 2018-02-22 10:46:55 · 617 阅读 · 0 评论 -
【BZOJ3676】【APIO2014】回文串
【题目链接】点击打开链接【思路要点】回文树模板题。时间复杂度\(O(|S|)\)。【代码】#include<bits/stdc++.h> using namespace std; #define MAXN 300005 struct Palindromic_Tree { int child[MAXN][26], father[MAXN]; int depth[MAXN], cnt[...原创 2018-04-01 20:17:19 · 348 阅读 · 0 评论 -
【BZOJ2565】最长双回文串
【题目链接】点击打开链接【思路要点】回文树模板题。时间复杂度\(O(|S|)\)。【代码】#include<bits/stdc++.h> using namespace std; #define MAXN 100005 struct Palindromic_Tree { int child[MAXN][26], ans[MAXN]; int father[MAXN], depth[...原创 2018-04-10 17:43:36 · 165 阅读 · 0 评论 -
【BZOJ2160】拉拉队排练
【题目链接】点击打开链接【思路要点】补档博客,无题解。【代码】#include<bits/stdc++.h> using namespace std; #define MAXN 1000005 #define P 19930726 long long power(long long x, long long y) { if (y == 0) return 1; long long ...原创 2018-04-03 15:12:58 · 270 阅读 · 0 评论 -
【BZOJ2342】【SHOI2011】双倍回文
【题目链接】点击打开链接【思路要点】补档博客,无题解。【代码】//PalindromicTree #include<bits/stdc++.h> using namespace std; #define MAXN 500005 int n; char s[MAXN]; struct Palindromic_Tree { int child[MAXN][26], ans; int f...原创 2018-04-03 18:49:53 · 261 阅读 · 0 评论 -
【BZOJ4044】【Cerc2014】Virus synthesis
【题目链接】点击打开链接【思路要点】补档博客,无题解。【代码】#include<bits/stdc++.h> using namespace std; #define MAXN 100005 template <typename T> void read(T &x) { x = 0; int f = 1; char c = getchar(); for (; ...原创 2018-04-25 16:35:41 · 418 阅读 · 0 评论