5. Longest Palindromic Substring DescriptionHintsSubmissionsDiscussSolution DiscussPick One Given a string s, find the longest palindromic substring i ...
分类:
其他好文 时间:
2017-08-09 19:57:54
阅读次数:
115
Statements A sequence of positive and non-zero integers called palindromic if it can be read the same forward and backward, for example: 15 2 6 4 6 2 ...
分类:
其他好文 时间:
2017-08-09 13:02:42
阅读次数:
176
Palindromic Game Problem Code: PALINGAM Palindromic Game Problem Code: PALINGAM Palindromic Game Problem Code: PALINGAM There are two players A, B pla ...
分类:
其他好文 时间:
2017-08-07 22:29:25
阅读次数:
248
D. Palindromic characteristics 题意:求给定字符串每阶回文子串有多少个。 tags:根本没想到 dp。。直接看官方题解吧 dp[i][j] 代表第 i 个字符到第 j 个字符的子串是几阶回文。 Solution. Let's calculate the followin ...
分类:
其他好文 时间:
2017-08-06 14:17:09
阅读次数:
216
【算法】区间DP 【题解】涉及回文问题的区间DP都可以用类似的写法,就是h[i][j]表示i~j是否回文,然后就可以O(1)判断回文了。 f[i][j]=k表示该字符串是k-th字符串,因为首先要求回文,既然回文那么左半边和右半边就肯定一样了。 #include<cstdio> #include<a ...
分类:
其他好文 时间:
2017-08-06 12:43:48
阅读次数:
117
SPOJ Problem Set (classical) 694. Distinct Substrings Problem code: DISUBSTR Given a string, we need to find the total number of its distinct substrin ...
分类:
其他好文 时间:
2017-08-06 12:39:49
阅读次数:
182
A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem yo ...
分类:
其他好文 时间:
2017-08-04 13:44:41
阅读次数:
438
5020: Palindromic Paths Time Limit(Common/Java):10000MS/30000MS Memory Limit:65536KByteTotal Submit: 8 Accepted:4 Description Given an N×N grid of fie ...
分类:
其他好文 时间:
2017-08-03 01:02:30
阅读次数:
223
题目链接:Codeforces Round #427 (Div. 2) D. Palindromic characteristics 题意: 给你一个串,定义k-th回文串,让你求每个k-th的数量。 题解: manacher处理好后做一下dp就行了。 当然也可以直接dp不用manacher. 1 ...
分类:
其他好文 时间:
2017-08-02 10:17:43
阅读次数:
150
D. Palindromic characteristics Palindromic characteristics of string s with length |s| is a sequence of |s| integers, where k-th number is the total n ...
分类:
其他好文 时间:
2017-08-01 21:41:27
阅读次数:
160