上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页
摘要: 题意 给 了 一 个 矩 阵 然 后 , 潜 艇 可 以 向 前 在 西北和东北之间 的区域, 然后每个潜艇有一个值D ,当到达潜艇距离为D的倍数的时候可以得到这个价值,这样我们1000*1000 的矩阵,D#include #include #include #include #include u... 阅读全文
posted @ 2014-11-27 22:28 来自大山深处的菜鸟 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 这题说的是给了 n 个操作。 每个操作会把 【a,b】 之间的球 涂为黑色或者 白色, 然后最后问 最长的连续的白色的 球有多少个,初始的时候全是黑的。我们将所有的点离散化, 记得离散 a-1, b+1, 因为如果你不离散 a-1 那么 在区间间隔时 间隔是黑色的 没有操作的你会计算成白色的, 然后... 阅读全文
posted @ 2014-11-23 15:06 来自大山深处的菜鸟 阅读(121) 评论(0) 推荐(0) 编辑
摘要: hdu 5107 这题说的是给了一个二维的 平面, 平面内有30000个点每个点都有自己的高度,然后又30000次的查询,每次查询给的是(X,Y,K), 要求出set(x,y){x,y|x#include #include #include using namespace std;const int... 阅读全文
posted @ 2014-11-23 09:16 来自大山深处的菜鸟 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 这题说的是给了一个二进制数R , 计算出 在[0,R) 区间内的数, 二进制中有n个1 个和n#include #include #include using namespace std;const int maxn =1005;typedef long long ll;const ll mod=1... 阅读全文
posted @ 2014-11-22 09:28 来自大山深处的菜鸟 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 这题说的是给了n(14)个点,每个点都以他 为根的最大可容的孩子个数和最小的可溶孩子个数L[i] ,R[i]问这n个点形成一棵树有多少种形态我们让 dp[i][S] 表示 一 i为根节点 的 拥有孩子S(二进制数)状态的 方案数 , sub[S] , 表示 以 S 状态表示的 森林的 方案数, su... 阅读全文
posted @ 2014-11-11 22:58 来自大山深处的菜鸟 阅读(241) 评论(0) 推荐(0) 编辑
摘要: C. Strange Sortingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputHow many specific orders do yo... 阅读全文
posted @ 2014-11-10 20:16 来自大山深处的菜鸟 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 题意 给了 一颗 有 100000 个节点的树, 他们构成的边有 n*(n-1)/2 种。 每条边有一个长度,长度排序后 取前K条的 和, 枚举每条长度为1 的边 放进队列,然后通过成都为1 的表去 形成长度为2的边,然后不断地接下去, 枚举到 K个就可以了 K #include #include ... 阅读全文
posted @ 2014-11-09 16:22 来自大山深处的菜鸟 阅读(144) 评论(0) 推荐(0) 编辑
摘要: GangstersNgangsters are going to a restaurant. Thei-th gangster comes at the timeTiand has theprosperityPi. The door of the restaurant hasK+1 states o... 阅读全文
posted @ 2014-11-08 12:17 来自大山深处的菜鸟 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Raucous RockersYou just inherited the rights tonpreviously unreleased songs recorded by the popular group Raucous Rockers. You plan to release a set o... 阅读全文
posted @ 2014-11-08 09:52 来自大山深处的菜鸟 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 这题说的是给了一个矩阵连乘的表达式,要求判断是否合法,括符是合法的就是表达式可能不合法 , 不合法的 输出 error 合法的输出 多少次运算, 采用递归 找到对应的区间递归下去#include #include #include #include using namespace std;typed... 阅读全文
posted @ 2014-11-07 19:11 来自大山深处的菜鸟 阅读(220) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 29 下一页