码迷,mamicode.com
首页 >  
搜索关键字:spoj balnum balanced    ( 1777个结果
【后缀自动机】SPOJ 1812-LCSII
题意: 给出最多10个长度不超过100000的字符串,求他们的LCS的长度。时限是鬼畜的0.25s 。后缀自动机练习...虽然有人这么说但我并不觉得hash能过。本题可以说是【论SAM中按step排序更新pre的重要性】: 总的来说做法和1811-LCS有点类似,不同的是因为有多个字符串,因此每.....
分类:其他好文   时间:2015-01-11 16:05:37    阅读次数:232
【后缀自动机】SPOJ 8222-最多重复子串
题意: 一个长度不超过250000的字符串,求出它长度为i的子串最多出现了多少次。 后缀自动机练习题...虽说是用Cube评测的不过时限仍然鬼畜。考虑SAM的性质: 一个串的SAM肯定可以接受这个串的所有子串。SAM上的每一个点代表了一个子串。 主链:SAM上最长的那条链,也就是说从根走...
分类:其他好文   时间:2015-01-11 15:59:35    阅读次数:249
【leetcode】Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2015-01-11 14:46:32    阅读次数:160
【leetcode】Convert Sorted Array to Binary Search Tree
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.每次把中间元素当成根节...
分类:其他好文   时间:2015-01-11 12:10:19    阅读次数:137
spoj 7258
Lexicographical Substring SearchTime Limit: 1000MSMemory Limit: Unknown64bit IO Format: %lld & %lluDescriptionLittle Daniel loves to play with strings...
分类:其他好文   时间:2015-01-10 22:14:19    阅读次数:301
spoj 8222
8222. SubstringsProblem code: NSUBSTRYou are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal ...
分类:其他好文   时间:2015-01-10 20:57:29    阅读次数:263
[LeetCode#110, 112, 113]Balanced Binary Tree, Path Sum, Path Sum II
Problem 1 [Balanced Binary Tree]Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as ...
分类:其他好文   时间:2015-01-10 06:36:11    阅读次数:290
Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2015-01-09 22:29:55    阅读次数:181
spoj 1812
1812. Longest Common Substring IIProblem code: LCS2A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the s...
分类:其他好文   时间:2015-01-09 22:06:32    阅读次数:339
Balanced Binary Tree
Balanced Binary Tree...
分类:其他好文   时间:2015-01-09 21:01:27    阅读次数:180
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!