上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页
摘要: 题意:给出一个数n,问n能否是斐波那契数列中数的乘积 先刷选 斐波那契数列,然后就枚举 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 #include <map> 5 #include <iostream> 6 using 阅读全文
posted @ 2016-05-12 20:55 zhaop 阅读(180) 评论(0) 推荐(0) 编辑
摘要: You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9596 Accepte 阅读全文
posted @ 2016-05-10 20:19 zhaop 阅读(173) 评论(0) 推荐(0) 编辑
摘要: A string is binary, if it consists only of characters "0" and "1". String v is a substring of string w if it has a non-zero length and can be read sta 阅读全文
posted @ 2016-05-10 19:06 zhaop 阅读(482) 评论(0) 推荐(0) 编辑
摘要: wo integers x and y are compatible, if the result of their bitwise "AND" equals zero, that is, a&b = 0. For example, numbers90(10110102) and 36(100100 阅读全文
posted @ 2016-05-10 18:54 zhaop 阅读(324) 评论(0) 推荐(0) 编辑
摘要: Phone Number 题目描述 We know that if a phone number A is another phone number B’s prefix, B is not able to be called. For an example, A is 123 while B is 阅读全文
posted @ 2016-05-01 21:44 zhaop 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 然而还不是很懂=_= 1 #include <iostream> 2 #include <cstring> 3 #include <algorithm> 4 #include <cstdio> 5 #include <queue> 6 using namespace std; 7 const int 阅读全文
posted @ 2016-04-28 21:30 zhaop 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 题目链接 题意:给出一个树形结构,求P个节点的子树最少要去掉几条边 分析:DP[root][j] 表示 以第 root 个为根节点, 包含j 个节点需要去掉几条边。那么对于 root 这个根节点来说, 要么选择 他的一个 儿子 k, 要么不选择, 如果选择 dp[root][j] = min( dp 阅读全文
posted @ 2016-04-26 19:10 zhaop 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Edward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from the capital as fast as pos 阅读全文
posted @ 2016-04-25 19:57 zhaop 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 问题描述 输入描述 输出描述 输入样例 输出样例 有一个明显的性质:如果子串(i,j)包含了至少k个不同的字符,那么子串(i,k),(j < k < length)也包含了至少k个不同字符。 因此对于每一个左边界,只要找到最小的满足条件的右边界,就能在O(1)时间内统计完所有以这个左边界开始的符合条 阅读全文
posted @ 2016-04-24 20:37 zhaop 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 输入描述 输出描述 输入样例 输出样例 1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 using namespace std; 6 const int Max = 100 阅读全文
posted @ 2016-04-24 20:29 zhaop 阅读(588) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 28 下一页