边吃边敲,效率就是高
代码如下:
#include
#include
#define MAX 1000050
char s[MAX],ss[MAX*2];
int p[MAX*2];
int min(int a,int b){return a>b?b:a;}
int main()
{
int i,id,mx,max,n,j;
j=1;
while(scanf("%s",s...
分类:
其他好文 时间:
2014-07-19 02:31:25
阅读次数:
166
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:
其他好文 时间:
2014-07-19 00:05:43
阅读次数:
200
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers b...
分类:
其他好文 时间:
2014-07-18 15:17:26
阅读次数:
201
??
Description
Problem H: Partitioning by Palindromes
We say a sequence of characters is a palindrome if it is the same written forwards and backwards. For example, 'racecar' is a palindrome,...
分类:
其他好文 时间:
2014-07-18 15:13:10
阅读次数:
266
Palindrome
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 51913
Accepted: 17877
Description
A palindrome is a symmetrical string, that is, a string read ide...
分类:
其他好文 时间:
2014-07-18 12:21:25
阅读次数:
207
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-07-18 12:12:12
阅读次数:
222
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["2", "1", ...
分类:
其他好文 时间:
2014-07-18 11:19:56
阅读次数:
210
Avalidprovisioningprofileforthisexecutablewasnotfound导入证书,真机运行报错原因:provisioningprofile所对应的证书里面所包含的设备中,缺少了你自己这台设备的UDID,你需要把自己的UDID发送给提供provisioning文件的那个人,让他给你加上,然后再重新提供一个provisioningp..
分类:
其他好文 时间:
2014-07-17 20:23:09
阅读次数:
203
上一篇说到了,对于OS X 10.10 DP2,使用它内置的createinstallmedia命令生成的USB安装盘,安装后会把目标分区转化为Core Storage;另外,该命令的不完善的地方是,有的时候会说"xxx is not a valid volume mount point."而无法继续。所以,这个小脚本就派上了用场:...
分类:
其他好文 时间:
2014-07-17 16:39:39
阅读次数:
326
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are
all va...
分类:
其他好文 时间:
2014-07-17 10:18:17
阅读次数:
181