上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
  2012年11月17日
摘要: Problem DescriptionA group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever enough, it shall be able to reach the banana by placing one block on 阅读全文
posted @ 2012-11-17 23:23 MrMission 阅读(134) 评论(0) 推荐(0) 编辑
  2012年11月16日
摘要: Problem DescriptionFatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence so that the weights are increasing, but the speeds are decreasing.InputInput con 阅读全文
posted @ 2012-11-16 10:05 MrMission 阅读(167) 评论(0) 推荐(0) 编辑
  2012年11月14日
摘要: Problem DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another sequence Z = <z1, z2, ..., zk> is a subsequence of X if there exists a strictly increasing sequence <i1, i2, ..., ik&g 阅读全文
posted @ 2012-11-14 14:45 MrMission 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Problem Description穿过幽谷意味着离大魔王lemon已经无限接近了!可谁能想到,yifenfei在斩杀了一些虾兵蟹将后,却再次面临命运大迷宫的考验,这是魔王lemon设下的又一个机关。要知道,不论何人,若在迷宫中被困1小时以上,则必死无疑!可怜的yifenfei为了去救MM,义无返顾地跳进了迷宫。让我们一起帮帮执着的他吧!命运大迷宫可以看成是一个两维的方格阵列,如下图所示:yifenfei一开始在左上角,目的当然是到达右下角的大魔王所在地。迷宫的每一个格子都受到幸运女神眷恋或者痛苦魔王的诅咒,所以每个格子都对应一个值,走到那里便自动得到了对应的值。现在规定yifenfei只能 阅读全文
posted @ 2012-11-14 09:52 MrMission 阅读(310) 评论(0) 推荐(0) 编辑
  2012年11月13日
摘要: Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝,每秒种只有在移动不超过一米的范围内接住坠落的馅饼。现在给这条小径如图标上坐标:为了使问题简化,假设在接下来的一段时间里,馅饼都掉落在0-10这11个位置。开始时 阅读全文
posted @ 2012-11-13 11:12 MrMission 阅读(502) 评论(0) 推荐(0) 编辑
摘要: Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的高度,接下来用N行数字表示数塔,其中第i行有个i个整数,且所有的整数均在区间[0,99]内。Output对于每个测试实例,输出可能得到的最大和,每个实例的输出占一行。Sample Input1573 88 1 阅读全文
posted @ 2012-11-13 08:11 MrMission 阅读(717) 评论(0) 推荐(0) 编辑
  2012年11月12日
摘要: Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input contains an integer T(1<=T<=20) which means the number 阅读全文
posted @ 2012-11-12 22:22 MrMission 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There are many people lined up at the lunch time.Now we define that ‘f’ is short for female and ‘m’ is short for male. If the queue’s length is L, 阅读全文
posted @ 2012-11-12 10:32 MrMission 阅读(344) 评论(0) 推荐(0) 编辑
  2012年11月10日
摘要: Problem Description人称“AC女之杀手”的超级偶像LELE最近忽然玩起了深沉,这可急坏了众多“Cole”(LELE的粉丝,即"可乐"),经过多方打探,某资深Cole终于知道了原因,原来,LELE最近研究起了著名的RPG难题:有排成一行的n个方格,用红(Red)、粉(Pink)、绿(Green)三色涂每个格子,每格涂一色,要求任何相邻的方格不能同色,且首尾两格也不同色.求全部的满足要求的涂法.以上就是著名的RPG难题.如果你是Cole,我想你一定会想尽办法帮助LELE解决这个问题的;如果不是,看在众多漂亮的痛不欲生的Cole女的面子上,你也不会袖手旁观吧?I 阅读全文
posted @ 2012-11-10 10:09 MrMission 阅读(308) 评论(0) 推荐(0) 编辑
  2012年11月9日
摘要: Problem Description在一无限大的二维平面中,我们做如下假设:1、每次只能移动一格;2、不能向后走(假设你的目的地是“向上”,那么你可以向左走,可以向右走,也可以向上走,但是不可以向下走);3、走过的格子立即塌陷无法再走第二次;求走n步不同的方案数(2种走法只要有一步不一样,即被认为是不同的方案)。Input首先给出一个正整数C,表示有C组测试数据接下来的C行,每行包含一个整数n (n<=20),表示要走n步。Output请编程输出走n步的不同方案总数;每组的输出占一行。Sample Input212Sample Output37CodeView CodeKey poin 阅读全文
posted @ 2012-11-09 22:15 MrMission 阅读(545) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页