上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页
摘要: Problem Description你有一个日志文件,里面记录着各种系统事件的详细信息。自然的,事件的时间戳按照严格递增顺序排列(不会有两个事件在完全相同的时刻发生)。遗憾的是,你的系统被病毒感染了,日志文件中混入了病毒生成的随机伪事件(但真实事件的相对顺序保持不变)。备份的日志文件也被感染了,但由于病毒采用的随机感染方法,主日志文件和备份日志文件在感染后可能会变得不一样。给出被感染的主日志和备份日志,求真实事件序列的最长可能长度。Input输入第一行为数据组数T (T#includeint main(){int a[1005],b[1005],la,lb,f[1005];int i,j,n 阅读全文
posted @ 2013-07-30 15:28 forevermemory 阅读(232) 评论(1) 推荐(0) 编辑
摘要: Problem DescriptionYou, the leader of Starship Troopers, are sent to destroy a base of the bugs. The base is built underground. It is actually a huge cavern, which consists of many rooms connected with tunnels. Each room is occupied by some bugs, and their brains hide in some of the rooms. Scientist 阅读全文
posted @ 2013-07-27 13:43 forevermemory 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Problem Description据说在很久很久以前,可怜的兔子经历了人生中最大的打击——赛跑输给乌龟后,心中郁闷,发誓要报仇雪恨,于是躲进了杭州下沙某农业园卧薪尝胆潜心修炼,终于练成了绝技,能够毫不休息得以恒定的速度(VR m/s)一直跑。兔子一直想找机会好好得教训一下乌龟,以雪前耻。 最近正值HDU举办50周年校庆,社会各大名流齐聚下沙,兔子也趁此机会向乌龟发起挑战。虽然乌龟深知获胜希望不大,不过迫于舆论压力,只能接受挑战。 比赛是设在一条笔直的道路上,长度为L米,规则很简单,谁先到达终点谁就算获胜。 无奈乌龟自从上次获胜以后,成了名龟,被一些八卦杂志称为“动物界的刘翔”,广告不断,手 阅读全文
posted @ 2013-07-26 22:19 forevermemory 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionZZ自从上大学以来,脑容量就是以SB计算的,这个吃货竟然连算术运算也不会了,可是当今的计算机可是非常强大的,作为ACMer, 几个简单的算术又算得了什么呢?可是该怎么做呢?ZZ只想算简单的加减乘除,由于大脑钝化,ZZ连小数都没有概念了!Input有多组测试数据,每组测试数据为一个字符串,字符串为合法的算术运算,运算符号只包含+、-、*、/,数据为整数.Output请输出正确的结果,除数为0的时候,输出impossible。(结果保证在长整形之内)Sample Input1+1*22/2+1Sample Output32题意:简单的表达式计算只包含加减乘除题 阅读全文
posted @ 2013-07-25 08:54 forevermemory 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionAn n x n game board is populated with integers, one nonnegative integer per square. The goal is to travel along any legitimate path from the upper left corner to the lower right corner of the board. The integer in any one square dictates how large a step away from that location mu 阅读全文
posted @ 2013-07-21 17:02 forevermemory 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionSpeakless很早就想出国,现在他已经考完了所有需要的考试,准备了所有要准备的材料,于是,便需要去申请学校了。要申请国外的任何大学,你都要交纳一定的申请费用,这可是很惊人的。Speakless没有多少钱,总共只攒了n万美元。他将在m个学校中选择若干的(当然要在他的经济承受范围内)。每个学校都有不同的申请费用a(万美元),并且Speakless估计了他得到这个学校offer的可能性b。不同学校之间是否得到offer不会互相影响。“I NEED A OFFER”,他大叫一声。帮帮这个可怜的人吧,帮助他计算一下,他可以收到至少一份offer的最大概率。(如果 阅读全文
posted @ 2013-07-20 23:30 forevermemory 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2013-07-20 11:48 forevermemory 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionLL最近沉迷于AC不能自拔,每天寝室、机房两点一线。由于长时间坐在电脑边,缺乏运动。他决定充分利用每次从寝室到机房的时间,在校园里散散步。整个HDU校园呈方形布局,可划分为n*n个小方格,代表各个区域。例如LL居住的18号宿舍位于校园的西北角,即方格(1,1)代表的地方,而机房所在的第三实验楼处于东南端的(n,n)。因有多条路线可以选择,LL希望每次的散步路线都不一样。另外,他考虑从A区域到B区域仅当存在一条从B到机房的路线比任何一条从A到机房的路线更近(否则可能永远都到不了机房了…)。现在他想知道的是,所有满足要求的路线一共有多少条。你能告诉他吗?Inp 阅读全文
posted @ 2013-07-18 09:15 forevermemory 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionWe all love recursion! Don't we?Consider a three-parameter recursive function w(a, b, c):if a 20 or b > 20 or c > 20, then w(a, b, c) returns: w(20, 20, 20)if a using namespace std;int p[22][22][22];int fun(int a,int b,int c){if(a20||j>20||k>20) return p[20][20][20 阅读全文
posted @ 2013-07-17 11:15 forevermemory 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionA project manager wants to determine the number of the workers needed in every month. He does know the minimal number of the workers needed in each month. When he hires or fires a worker, there will be some extra cost. Once a worker is hired, he will get the salary even if he is n 阅读全文
posted @ 2013-07-17 09:55 forevermemory 阅读(220) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 19 下一页