题目链接:http://poj.org/problem?id=2533 Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 55459 Accepted: 24864 Descr ...
分类:
其他好文 时间:
2017-10-03 21:38:06
阅读次数:
180
这个题是想要找到最长回文字串,我刚开始想的是: 以每一个字符为中心,然后向两边扩展寻找,应该分为奇数和偶数为中心两种情况~ 代码应该没问题吧,但是提交上去超时了,因为后来它用的测试数据非常大啊,后来上网看了看别人的,就想着用动态规划试试看。 (然后,待续(笑)) ...
分类:
其他好文 时间:
2017-10-03 11:26:19
阅读次数:
166
题目: http://www.1point3acres.com/bbs/thread-131978-1-1.html 实现: ...
分类:
其他好文 时间:
2017-10-03 10:38:52
阅读次数:
201
link Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", t ...
分类:
其他好文 时间:
2017-10-02 21:33:49
阅读次数:
94
LCS2 - Longest Common Substring II no tags no tags A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the ...
分类:
其他好文 时间:
2017-10-01 13:38:44
阅读次数:
245
LCS - Longest Common Substring A string is finite sequence of characters over a non-empty finite set Σ. In this problem, Σ is the set of lowercase let ...
分类:
其他好文 时间:
2017-09-30 23:14:41
阅读次数:
393
我在网上看到了一点神奇的代码,用来计算一个数字末尾连续零的个数。 刚好我在优化一个I2C读写函数(只写入I2C特定bit),觉得这个很有用。经过尝试,确实没问题。 下面我隆重介绍一下: Count the consecutive zero bits (trailing) on the right w ...
分类:
其他好文 时间:
2017-09-30 19:56:52
阅读次数:
170
题意 : 给出一颗无向边构成是树,每一条边都有一个边权,叫你选出一条路,使得此路所有的边的异或值最大。 分析 : 暴力是不可能暴力的,这辈子不可能暴力,那么来冷静分析一下如何去做。假设现在答案的异或值的最大的路的起点和终点分别为 a、b,这个异或值为了方便我用 ⊕(a, b) 表示,那么接下来有一个 ...
分类:
其他好文 时间:
2017-09-30 13:18:24
阅读次数:
109
Given an unsorted array of integers, find the length of longest continuous increasing subsequence. Example 1: Example 2: Note: Length of the array wil ...
分类:
其他好文 时间:
2017-09-29 00:09:34
阅读次数:
144
The xor-longest Path Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7332 Accepted: 1555 Description In an edge-weighted tree, the xor-leng ...
分类:
其他好文 时间:
2017-09-28 22:32:37
阅读次数:
409