摘要: ##题面 Problem 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 阅读全文
posted @ 2020-07-12 15:51 Luglucky 阅读(109) 评论(0) 推荐(0) 编辑
摘要: ##题面 Problem Description Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our dai 阅读全文
posted @ 2020-07-12 15:43 Luglucky 阅读(159) 评论(0) 推荐(0) 编辑
摘要: ##题面 Matrix Power Series Time Limit: 3000MS Memory Limit: 131072K Total Submissions: 19338 Accepted: 8161 Description Given a n × n matrix A and a pos 阅读全文
posted @ 2020-07-12 10:20 Luglucky 阅读(95) 评论(0) 推荐(0) 编辑
摘要: ##题面 Problem Description 经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。 这样住了一 阅读全文
posted @ 2020-07-10 20:42 Luglucky 阅读(147) 评论(0) 推荐(0) 编辑
摘要: ##题面 输入一个树状天平,根据力矩相等原则判断是否平衡。如图6-5所示,所谓力矩相等, 就是WlDl=WrDr,其中Wl和Wr分别为左右两边砝码的重量,D为距离。 采用递归(先序)方式输入:每个天平的格式为Wl,Dl,Wr,Dr,当Wl或Wr为0时,表 示该“砝码”实际是一个子天平,接下来会描述这 阅读全文
posted @ 2020-07-08 14:04 Luglucky 阅读(234) 评论(0) 推荐(0) 编辑
摘要: ##题面 Element Extermination time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given an a 阅读全文
posted @ 2020-07-07 18:09 Luglucky 阅读(91) 评论(0) 推荐(0) 编辑
摘要: ##题面 Problem Description 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中 阅读全文
posted @ 2020-07-07 10:32 Luglucky 阅读(246) 评论(0) 推荐(0) 编辑
摘要: ##题面 Problem Description The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common t 阅读全文
posted @ 2020-07-05 22:50 Luglucky 阅读(124) 评论(0) 推荐(0) 编辑
摘要: ##题面 Problem Description Hogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例子里,一开始楼梯在竖直方向,一分钟以后它移动到了水平方向,再过一分钟它又回到了竖直方向.Harry发现对他来 阅读全文
posted @ 2020-07-05 16:10 Luglucky 阅读(228) 评论(0) 推荐(0) 编辑
摘要: ##题面 Problem Description 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升 阅读全文
posted @ 2020-07-05 11:46 Luglucky 阅读(156) 评论(0) 推荐(0) 编辑