P1217 Prime Palindromes P1217 Prime Palindromes P1217 Prime Palindromes 题目描述 因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。 写一个程序来找出范围[a,b](5 <= a < ...
分类:
其他好文 时间:
2018-05-15 01:51:53
阅读次数:
189
[抄题]: 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-04-25 22:09:20
阅读次数:
159
题目描述 因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。 写一个程序来找出范围[a,b](5 <= a < b <= 100,000,000)( 一亿)间的所有回文质数; 输入输出格式 输入格式: 第 1 行: 二个整数 a 和 b . 输出格式: ...
分类:
其他好文 时间:
2018-03-29 18:59:19
阅读次数:
131
蒟蒻对这题的思路很简单,懒得想太多复杂的细节,先打一个O(n)的暴力算法,再一次像下方粘的代码这样输出 cpp freopen("DABIAO.ans","w",stdout); bool a[10010000]; cout using namespace std; int a[101010000] ...
分类:
其他好文 时间:
2018-03-21 00:11:15
阅读次数:
346
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2631 题意: 输入一个由小写字母组成的字符串(长度不超过1000),你的任务是把它划分成尽量少的 ...
分类:
其他好文 时间:
2018-03-15 22:16:46
阅读次数:
212
Problem Statement Each card must be used in exactly one of the palindromes. The total number of palindromes must be as small as possible. Definition L ...
分类:
其他好文 时间:
2018-03-14 18:10:37
阅读次数:
187
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2744 题目描述: A regular palindrome is a string of numbers or letters that is the same ...
分类:
其他好文 时间:
2018-03-11 14:36:26
阅读次数:
168
题目链接:http://poj.org/problem?id=3376 题目大意:给你n个字符串,这n个字符串可以两两组合形成n*n个字符串,求这些字符串中有几个是回文串。 解题思路:思路参考了这里:http://blog.csdn.net/qq_30241305/article/details/5 ...
分类:
其他好文 时间:
2018-03-04 01:07:21
阅读次数:
169
【SPOJ】NUMOFPAL Number of Palindromes(Manacher,回文树) 题面 "洛谷" 求一个串中包含几个回文串 题解 Manacher傻逼题 只是用回文树写写而已。。 cpp include include include include include includ ...
分类:
其他好文 时间:
2018-02-23 22:18:06
阅读次数:
192
题目描述 因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。 写一个程序来找出范围[a,b](5 5 500 输出样例 1: 5 7 11 101 131 151 181 191 313 353 373 383 说明 Hint 1: Generate t ...
分类:
其他好文 时间:
2018-02-22 19:53:05
阅读次数:
175