码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
poj 2739 Sum of Consecutive Prime Numbers 素数 读题 难度:0
Sum of Consecutive Prime NumbersTime Limit:1000MSMemory Limit:65536KTotal Submissions:19697Accepted:10800DescriptionSome positive integers can be repr...
分类:其他好文   时间:2014-11-23 00:38:40    阅读次数:188
poj - 3764 - The xor-longest Path(Trie)
题意:一棵 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
Longest Consecutive Sequence
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
UVA - 10285 Longest Run on a Snowboard
从任意点出发,走出一条严格递减的序列出来,看最长序列是多长 #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
LeetCode: Longest Valid Parentheses 解题报告
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
Maximum Depth of Binary Tree
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
Leetcode-Longest Valid Parentheses
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
Tic Tac Toe
ProblemN*N matrix is given with input red or black.You can move horizontally, vertically or diagonally. If 3 consecutive samecolor found, that color w...
分类:其他好文   时间:2014-11-21 06:56:50    阅读次数:291
Telephone Number
ProblemPrint all valid phone numbers of length n subject to following constraints:If a number contains a 4, it should start with 4No two consecutive d...
分类:其他好文   时间:2014-11-21 06:54:39    阅读次数:149
Maximum Depth of Binary Tree 树的最大深度
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-19 23:46:55    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!