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 longes...
分类:
其他好文 时间:
2014-11-24 00:49:37
阅读次数:
239
模块说明提供基于文件的项式存储,项式以元组表示,其中某个位置为键,默认第1位置Dets为Mniesia所用,后者增加了事务、查询、和分布式支持。Dets文件不能超过2GB。Dets只有set 、bag、 duplicate_bag 三种类型,没有ordered_set显示调用关闭或者打开的proce...
分类:
其他好文 时间:
2014-11-23 20:05:31
阅读次数:
353
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-11-23 14:21:58
阅读次数:
205
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 ...
分类:
其他好文 时间:
2014-11-23 09:16:30
阅读次数:
150
题意:一棵 n 个结点的树,树边有权值w(0
题目链接:http://poj.org/problem?id=3764
——>>取0为根,预处理出所有结点到根的异或xOr[i]。那么结点 a 与结点 b 之间的路径异或就是xOr[a] ^ xOr[b]。。
权值 w 最多31位,于是,将每个xOr的二进制表示从高位到低位插入到 01 Trie中(0为0,非0为1)。。
查询时从高位开始贪心...
分类:
其他好文 时间:
2014-11-22 10:40:33
阅读次数:
230
Problem StatementGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example, Given [100, 4, 200, 1,...
分类:
其他好文 时间:
2014-11-22 01:57:26
阅读次数:
190
从任意点出发,走出一条严格递减的序列出来,看最长序列是多长
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int a[110][110];
int dp[110][110];
int dx[4]={0,0,-1,1};...
分类:
其他好文 时间:
2014-11-21 21:58:23
阅读次数:
203
Longest Valid ParenthesesGiven a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses sub...
分类:
其他好文 时间:
2014-11-21 20:31:10
阅读次数:
235
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-11-21 18:34:47
阅读次数:
167
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the lon...
分类:
其他好文 时间:
2014-11-21 14:00:49
阅读次数:
172