10 2016 档案

摘要:Description Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. Ther 阅读全文
posted @ 2016-10-30 16:45 抓不住Jerry的Tom 阅读(399) 评论(0) 推荐(0)
摘要:Description Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 阅读全文
posted @ 2016-10-30 15:16 抓不住Jerry的Tom 阅读(305) 评论(0) 推荐(0)
摘要:Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Description 在一个给定形状的棋盘(形状可能是不规则的)上面摆放 阅读全文
posted @ 2016-10-29 16:14 抓不住Jerry的Tom 阅读(243) 评论(0) 推荐(0)
摘要:Consider a tree network with n nodes where the internal nodes correspond to servers and the terminalnodes correspond to clients. The nodes are numbere 阅读全文
posted @ 2016-10-29 15:05 抓不住Jerry的Tom 阅读(277) 评论(0) 推荐(0)
摘要:Description Archeologists have found a secret pass in the dungeon of one of the pyramids of Cycleland. To enter the treasury they have to open an unus 阅读全文
posted @ 2016-10-25 23:57 抓不住Jerry的Tom 阅读(596) 评论(0) 推荐(0)
摘要:题目: 给你b元钱,让你组装一台电脑,有n个配件,属性有 种类 名字 价格 品质,每种类型选至少一个,并且最小品质最大。输出这个最大的最小品质。 白书上说了,最小值最大的问题一般是二分来求解答案。在这里我们二分这个品质。这个题在判断时因为数据较小,所以线性查找了,如果遇到大数据就要排序+lower_ 阅读全文
posted @ 2016-10-25 11:05 抓不住Jerry的Tom 阅读(334) 评论(0) 推荐(0)
摘要:题目: 给你1到n,现在让你将每个数变成0,每一步操作可以选取任意数一起减去一个整数,减完了不能为负数!问你最少需要几步? 巨水的题,然而为什么要写博客呢?提醒自己要记得递归函数,不要傻傻的开数组硬比较 公式:f(n)=f(n/2)+1; 代码如下: 阅读全文
posted @ 2016-10-25 09:59 抓不住Jerry的Tom 阅读(213) 评论(0) 推荐(0)
摘要:In most professional sporting events, cheerleaders play a major role in entertaining the spectators. Theirroles are substantial during breaks and prio 阅读全文
posted @ 2016-10-23 20:50 抓不住Jerry的Tom 阅读(263) 评论(0) 推荐(0)
摘要:Description Input 4 1 2 1 3 1 4题目的意思是给你一棵树,让你找到所有不在一条路径上的三个点的情况个数。乍一看正向处理比较麻烦,我们从反方向考虑,如果是取在一条路径上的3个点,那又该怎样取呢?我们以Num[rt]表示以rt为根的子树上的节点的个数(包括根节点)。选取方法是 阅读全文
posted @ 2016-10-15 07:41 抓不住Jerry的Tom 阅读(134) 评论(0) 推荐(0)
摘要:Description 度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,且只能向上向下向右走以前没有走过的格子,每一个格子中都有一些金币(或正或负,有可能遇到强盗拦路抢劫, 度度熊身上金币 阅读全文
posted @ 2016-10-14 11:04 抓不住Jerry的Tom 阅读(265) 评论(0) 推荐(0)
摘要:Description Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or 阅读全文
posted @ 2016-10-11 10:44 抓不住Jerry的Tom 阅读(377) 评论(0) 推荐(0)
摘要:Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on thetrees, followed quickly by the falling leaves a 阅读全文
posted @ 2016-10-09 14:48 抓不住Jerry的Tom 阅读(215) 评论(0) 推荐(0)
摘要:Before being an ubiquous communications gadget, a mobilewas just a structure made of strings and wires suspendingcolourfull things. This kind of mobil 阅读全文
posted @ 2016-10-09 14:05 抓不住Jerry的Tom 阅读(233) 评论(0) 推荐(0)
摘要:Description During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally s 阅读全文
posted @ 2016-10-09 10:05 抓不住Jerry的Tom 阅读(278) 评论(0) 推荐(0)
摘要:Description You are to determine the value of the leaf node in a given binary tree that is the terminal node of apath of least value from the root of 阅读全文
posted @ 2016-10-01 10:57 抓不住Jerry的Tom 阅读(290) 评论(0) 推荐(0)