Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl ...
分类:
其他好文 时间:
2016-09-03 21:02:49
阅读次数:
159
题目链接:http://codeforces.com/problemset/problem/691/B 题意: 给你一个字符串,需要让你判断这个字符串是否为镜像串,即关于中心轴对称. 思路: 常量数组的运用,需要注意的是当字符串包含奇数个字符时最中间的那个字符不要忘记判断. 代码: ...
分类:
其他好文 时间:
2016-09-03 18:01:20
阅读次数:
125
题目大意:一个字符串,用已知的字符把它变为回文串时,代价最小是多少?其中添加一个字符或删除一个字符都有相应代价。 Input Line 1: Two space-separated integers: N and M Line 2: This line contains exactly M char ...
分类:
其他好文 时间:
2016-09-01 18:47:35
阅读次数:
192
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning ...
分类:
其他好文 时间:
2016-09-01 14:29:50
阅读次数:
134
Prime Palindromes The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as ...
分类:
其他好文 时间:
2016-08-29 17:56:26
阅读次数:
247
题目链接: http://codeforces.com/problemset/problem/691/B 题目大意: 求一个字符串是不是镜像的(不是回文)。是输出TAK否则RE。 题目思路: 【模拟】 预处理镜像的字母,注意bd pq,从头尾开始模拟。 1 // 2 //by coolxxx 3 / ...
分类:
其他好文 时间:
2016-08-28 01:00:25
阅读次数:
272
[题目] Determine whether an integer is a palindrome. Do this without extra space. [题目解析] 判断一个给定整数是否为回文数,回文数即121,11411这种正着和反着相同的数字,最小的回文数是0。实现思路可以比较直接,先对 ...
分类:
其他好文 时间:
2016-08-26 13:44:59
阅读次数:
110
Determine whether an integer is a palindrome. Do this without extra space. Solution: ...
Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning ...
分类:
其他好文 时间:
2016-08-23 12:53:04
阅读次数:
95
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest ...
分类:
其他好文 时间:
2016-08-22 18:16:49
阅读次数:
165