题目Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example, given s = “aab”,
Return[
[“aa”,”b”],...
分类:
其他好文 时间:
2015-03-02 22:35:33
阅读次数:
149
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 35930
Accepted: 15779
Description
A numeric sequence of ai is ordered if a1...
分类:
其他好文 时间:
2015-03-02 21:01:07
阅读次数:
189
1.对象的查找document.title = obj[self.today.substring(0, 7)];不需要以下这么麻烦:$.each(obj , function(index,val){ var month = self.today.substring(0,7); if(in...
分类:
其他好文 时间:
2015-03-02 18:29:48
阅读次数:
126
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-03-02 18:25:51
阅读次数:
154
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
For example,
Given [100, 4, 200, 1, 3, 2],
The longest consecutive elements sequence is [1, 2...
分类:
其他好文 时间:
2015-03-02 14:57:06
阅读次数:
136
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest sym...
分类:
其他好文 时间:
2015-03-02 09:29:08
阅读次数:
123
题目链接:http://poj.org/problem?id=2533
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 35929
Accepted: 15778
Description
A ...
分类:
其他好文 时间:
2015-03-01 18:33:22
阅读次数:
171
题意:已知:给出n个结点的树,定义:两结点间的权值为两点之间所有边相异或的值.求:树中的某两点间的最大权值.
思路:先说简单一点的题:有道CowXor,是一串线性序列,求某连续段异或的最大值,这题的思路是先求前i项序列相异或的值Si,所以x到y的连续异或就是Sx^Sy ,因为a^b = (a ^ c) ^ (b ^ c).
这题同样是这个思路把线性拓展到树上,先求任何点到某一定点的连续...
分类:
编程语言 时间:
2015-03-01 13:17:12
阅读次数:
160
使用以下Javascript代码即可获取Javascript文件自身所在URL路径。
var js = document.scripts;var url =js[js.length - 1].src;
如果需要获取Javascript文件所在文件夹,可以执行以下代码。如果想再获取上一层的文件夹,再执行一次下面的代码即可。
url = url.substring(0, url.lastIn...
分类:
编程语言 时间:
2015-02-28 16:36:32
阅读次数:
298
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab", Return
[
["aa","b...
分类:
其他好文 时间:
2015-02-28 16:29:29
阅读次数:
129