
回文树
七九河开
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
The Problem to Slow Down You UVALive - 7041 (回文树)
题目 https://cn.vjudge.net/problem/UVALive-7041题意求两个串的公共回文串的个数。思路DFS两个回文树#include <iostream>#include<bits/stdc++.h>using namespace std;const int MAXN = 210005 ;const int N = 2...原创 2019-02-20 15:00:27 · 287 阅读 · 0 评论 -
回文树模板
const int MAXN = 210005 ;const int N = 26 ;struct Palindromic_Tree { int next[MAXN][N] ;//next指针,next指针和字典树类似,指向的串为当前串两端加上同一个字符构成 int fail[MAXN] ;//fail指针,失配后跳转到fail指针指向的节点 long long c...原创 2019-02-20 15:01:03 · 228 阅读 · 0 评论 -
The Number of Palindromes HDU - 3948 (回文树)
题目 https://cn.vjudge.net/problem/HDU-3948题意求出本质不同的回文串个数。思路 回文树#include <iostream>#include<bits/stdc++.h>using namespace std;const int MAXN = 210005 ;const int N = 26 ;struct...原创 2019-02-20 15:02:43 · 200 阅读 · 0 评论 -
CA Loves Palindromic HDU - 5658 (回文树)
题目 https://cn.vjudge.net/problem/HDU-5658题意给定一个串,询问l到r右多少本质不同的回文串。思路回文树加暴力#include <iostream>#include<bits/stdc++.h>using namespace std;const int MAXN = 1005 ;const int N = ...原创 2019-02-20 15:05:11 · 150 阅读 · 0 评论