上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 46 下一页
  2016年9月8日
摘要: B. T-primes time limit per test 2 seconds time limit per test memory limit per test 256 megabytes memory limit per test input standard input input out 阅读全文
posted @ 2016-09-08 17:48 Beserious 阅读(470) 评论(0) 推荐(0) 编辑
摘要: XMAX - XOR Maximization Given a set of integers S = { a1, a2, a3, ... a|S| }, we define a function X on S as follows:X( S ) = a1 ^ a2 ^ a3 ^ ... ^ a|S 阅读全文
posted @ 2016-09-08 16:42 Beserious 阅读(464) 评论(0) 推荐(0) 编辑
  2016年9月6日
摘要: Consider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expr 阅读全文
posted @ 2016-09-06 15:55 Beserious 阅读(381) 评论(0) 推荐(0) 编辑
摘要: 1009. K-based Numbers Time limit: 0.5 secondMemory limit: 64 MB Let’s consider K-based numbers, containing exactly N digits. We define a number to be 阅读全文
posted @ 2016-09-06 15:14 Beserious 阅读(395) 评论(0) 推荐(0) 编辑
  2016年9月5日
摘要: There are given two strings, A and B. An expansion of some string X is a string created by adding or inserting any number (zero, one or more) of blank 阅读全文
posted @ 2016-09-05 02:25 Beserious 阅读(318) 评论(0) 推荐(0) 编辑
摘要: N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it: the road length and the toll th 阅读全文
posted @ 2016-09-05 02:19 Beserious 阅读(445) 评论(0) 推荐(0) 编辑
  2016年8月31日
摘要: 给一个正整数 n, 找到若干个完全平方数(比如1, 4, 9, ... )使得他们的和等于 n。你需要让平方数的个数最少。 给出 n = 12, 返回 3 因为 12 = 4 + 4 + 4。给出 n = 13, 返回 2 因为 13 = 4 + 9。 dp. 上面dp的时间复杂度是 O(n^2)空 阅读全文
posted @ 2016-08-31 19:56 Beserious 阅读(1189) 评论(2) 推荐(0) 编辑
  2016年8月29日
摘要: 必须知道一点: 前序遍历是:根、左、右 中序遍历是:左、根、右 后序遍历是:左、右、根 递归构建即可。 阅读全文
posted @ 2016-08-29 11:29 Beserious 阅读(625) 评论(0) 推荐(0) 编辑
  2016年8月20日
摘要: 比如1,2,3 的出栈次序可以是{1,2,3}{2,1,3}{2,3,1}{1,3,2}{3,2,1}5种。 其实这个 和leetcode生成括号那个题目很像。题目链接https://leetcode.com/problems/generate-parentheses/ 题解 http://www. 阅读全文
posted @ 2016-08-20 15:00 Beserious 阅读(632) 评论(0) 推荐(0) 编辑
  2016年8月18日
摘要: Counting Intersections Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 51 Accepted Submission(s) 阅读全文
posted @ 2016-08-18 18:21 Beserious 阅读(422) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 46 下一页