题目 A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic num ...
分类:
其他好文 时间:
2020-05-13 23:42:26
阅读次数:
103
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number ...
分类:
其他好文 时间:
2020-05-08 22:46:30
阅读次数:
65
题意 令$P(S)$为border集合中为回文串的个数。给定$S$,求$\sum\limits_{i}\sum\limits_j P(S[i,j])$ 做法 这个题主要是别想偏 考虑两个相同的回文串,可以组合在一起形成$1$的贡献 设某个回文串总共有$x$个,贡献为${x\choose 2}$ ...
分类:
其他好文 时间:
2020-05-04 21:48:52
阅读次数:
78
给定一个字符串 s,找到 s 中最长的回文子串(正读和反读都相同的字符串)。你可以假设 s 的最大长度为 1000。 ...
分类:
其他好文 时间:
2020-04-25 23:15:30
阅读次数:
55
题目 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s ...
分类:
其他好文 时间:
2020-04-15 18:30:58
阅读次数:
59
Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c ...
分类:
其他好文 时间:
2020-03-29 10:56:42
阅读次数:
54
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number . For example, 1234321 is a palindromic numbe ...
分类:
其他好文 时间:
2020-03-26 01:01:00
阅读次数:
67
[toc] ? 1332. 删除回文子序列 https://leetcode cn.com/problems/remove palindromic subsequences/ 描述 ? 884. 两句话中的不常见单词 https://leetcode cn.com/problems/uncommon ...
分类:
其他好文 时间:
2020-03-15 13:31:04
阅读次数:
53
class Solution { public String longestPalindrome(String s) { if (s == null || s.length() < 1) return ""; int start = 0; int end = 0; for (int i = 0; i ...
分类:
编程语言 时间:
2020-03-12 14:14:41
阅读次数:
65
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: ...
分类:
其他好文 时间:
2020-03-05 11:52:43
阅读次数:
60