码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
Single Number | LeetCode OJ 解题报告
题目网址:https://oj.leetcode.com/problems/single-number/题目描述:Given an array of integers, every element appears twice except for one. Find that single one....
分类:其他好文   时间:2014-12-05 22:34:16    阅读次数:248
【SPOJ】7258. Lexicographical Substring Search(后缀自动机)
http://www.spoj.com/problems/SUBLEX/后缀自动机系列完成QAQ。。。撒花。。明天or今晚写个小结?首先得知道:后缀自动机中,root出发到任意一个状态的路径对应一个子串,而且不重复。(原因似乎是逆序后缀树?所以我们在自动机上预处理每一个状态的子串数目,然后从小到大枚...
分类:其他好文   时间:2014-12-05 14:12:33    阅读次数:253
【SPOJ】1812. Longest Common Substring II(后缀自动机)
http://www.spoj.com/problems/LCS2/发现了我原来对sam的理解的一个坑233本题容易看出就是将所有匹配长度记录在状态上然后取min后再对所有状态取max。但是不要忘记了一点:更新parent树的祖先。为什么呢?首先如果子树被匹配过了,那么长度一定大于任意祖先匹配的长度...
分类:其他好文   时间:2014-12-05 07:04:26    阅读次数:318
Binary Tree post order traversal
One: Using two stacks, stack to traversal the node, stackr to record the parent node when visiting its right-child; https://oj.leetcode.com/problems.....
分类:其他好文   时间:2014-12-05 00:30:18    阅读次数:158
UVA 12186 Another Crisis(树形DP)
A couple of years ago, a new world wide crisis started, leaving many people with economical problems. Some workers of a particular company are trying to ask for an increase in their salaries. The com...
分类:其他好文   时间:2014-12-04 21:40:20    阅读次数:289
Android项目左边红X,项目里却没有错误提示。
参考资料:http://blog.csdn.net/lincyang/article/category/697217不要慌张,如果clean和重启都没有作用,此时要查看problems视图,快捷键为Alt+Shift+Q,X。把这里的问题描述拿去搜索,一般就会找到答案。
分类:移动开发   时间:2014-12-04 10:09:48    阅读次数:146
【SPOJ】8222. Substrings(后缀自动机)
http://www.spoj.com/problems/NSUBSTR/题意:给一个字符串S,令F(x)表示S的所有长度为x的子串中,出现次数的最大值。求F(1)..F(Length(S))这题做法:首先建立字符串的后缀自动机。因为自动机中的每个状态都代表一类子串前缀,且任意状态的最长的|max|...
分类:其他好文   时间:2014-12-04 07:41:30    阅读次数:254
[Leetcode] Binary Tree Maximum Path Sum
这是LeetCode上的一道题目,需要求二叉树中两点路径的最大和。原题是https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/Given a binary tree, find the maximum path sum.The p...
分类:其他好文   时间:2014-12-03 23:05:58    阅读次数:226
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!