You are given a tree (a connected acyclic undirected graph) of n vertices. Vertices are numbered from 1 to n and each vertex is assigned a character f ...
分类:
其他好文 时间:
2018-08-07 13:10:27
阅读次数:
189
UVA11584 https://www.luogu.org/problemnew/show/UVA11584 暑假开始刷lrj紫/蓝书DP题 这几天做的一道 思路 代码 #include<iostream> #include<cstring> #include<cstdio> #include<a ...
分类:
其他好文 时间:
2018-08-05 13:02:23
阅读次数:
129
Description Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those l ...
分类:
其他好文 时间:
2018-08-04 11:47:41
阅读次数:
116
Three Palindromes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1948 Accepted Submission(s): 68 ...
分类:
编程语言 时间:
2018-07-25 13:51:53
阅读次数:
232
http://acm.hdu.edu.cn/showproblem.php?pid=5340 题意 判断是否能将字符串S分成三段非空回文串 分析 manacher预处理出前缀和后缀回文的位置, 枚举第一个回文串和第三个回文串,这样得到第二个回文串的区间,找中点,因为manacher处理后所有的回文串 ...
分类:
编程语言 时间:
2018-07-11 12:20:15
阅读次数:
176
题意翻译 题目描述 给你一个字符串s由小写字母组成,有q组询问,每组询问给你两个数,l和r,问在字符串区间l到r的字串中,包含多少回文串。 输入格式 第1行,给出s,s的长度小于5000 第2行给出q(1题解 这个题目的思路非常巧妙? 因为时间复杂度允许达到$n$^2^,于是我们就从1开始一直到st ...
分类:
其他好文 时间:
2018-06-30 11:04:44
阅读次数:
165
题意翻译 求一个串中包含几个回文串 题目描述 Each palindrome can be always created from the other palindromes, if a single character is also a palindrome. For example, the ...
分类:
其他好文 时间:
2018-06-30 10:52:06
阅读次数:
170
http://acm.hdu.edu.cn/showproblem.php?pid=2029 Problem Description “回文串”是一个正读和反读都一样的字符串,比如“level”或者“noon”等等就是回文串。请写一个程序判断读入的字符串是否是“回文”。 Input 输入包含多个测试 ...
分类:
其他好文 时间:
2018-06-25 21:51:02
阅读次数:
204
题意 ~~我也不知道哪里来的OJ~~ $vjudge$ 上的 给定两个字符串 $S,T$ ,询问 $(i,j,k,l)$ 这样的四元组个数 使得 $S[i,j],T[k,l]$ 是相等的回文串 Sol 回文树 记录 $S$ 的每个回文串的出现位置的集合大小 匹配 $T$ 记录其每个回文串出现的位置集 ...
分类:
其他好文 时间:
2018-06-08 10:37:44
阅读次数:
205
题目描述: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters ...
分类:
其他好文 时间:
2018-06-07 19:18:44
阅读次数:
170