解题报告
richard_ma
这个作者很懒,什么都没留下…
展开
-
POJ1050 最大子矩阵
To the Maxhttp://poj.org/problem?id=1050DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within th...原创 2012-11-30 11:34:40 · 166 阅读 · 0 评论 -
fhloj1092 五子棋
五子棋 源文件: gobang(.bas/.c/.cpp/.pas) 输入文件: gobang.in 输出文件: gobang.out 小明和他的朋友小李两个人在玩五子棋。游戏规则很简单,小明用黑色棋子,小李用白色棋子。两人轮流在棋盘上放棋子,每次只能在一个没有棋子的地方摆放一没自己的棋子。如果有一方的棋子率先在任意方向(横向、纵向、斜向)的5个棋子连续(如图1索示),那么就判定...2013-07-04 12:01:35 · 169 阅读 · 0 评论 -
fhloj1091 拼单词
拼单词 源文件: words(.bas/.c/.cpp/.pas) 输入文件: words.in 输出文件: words.out 最近,小明的英语老师给小明留了一项作业,要求小明写一篇英文作文。小明刚学英语不久,经常在单词的拼写上犯错误,比如苹果apple写成了appel。所以小明写出的英文句子通常让人难以理解。 非常有趣的是,如果小明写下的英文句子中每一个单词的第一个字母...2013-07-04 11:53:12 · 214 阅读 · 0 评论 -
fhloj1090 21点游戏
21点游戏 源文件: poker(.bas/.c/.cpp/.pas) 输入文件: poker.in 输出文件: poker.out 小明和他的同学们最近痴迷一种叫做21点的纸牌游戏。游戏规则很简单,游戏一共需要两名玩家,两人分别从牌堆里面选取若干张牌。每张牌都有一个点数,每个玩家的点数就是手里存有的牌的点数之和。值得注意的是,如果一个玩家的点数超过21点,那么这名玩家的点数就会...2013-07-04 11:44:30 · 153 阅读 · 0 评论 -
fhloj1089 帮奶奶算帐
帮奶奶算账 源代码:bill.bas/pas 输入文件:bill.in 输出文件:bill.out 小明的奶奶每周日都会去超市购物,去买接下来一周所需的生活用品。虽然超市的票据上写得比较清楚,然而由于奶奶买的东西太多了,她也算不清楚自己到底花了多少钱。小明看到奶奶去超市购物的票据之后,发现如果用计算机程序来解决这个问题会非常容易。 所以现在小明把这个问题交给你,请你帮小明编写一个程序...2013-07-04 11:17:55 · 129 阅读 · 0 评论 -
hdu1019 gcd和lcm
Least Common Multiple [url]http://acm.hdu.edu.cn/showproblem.php?pid=1019[/url] Problem Description The least common multiple (LCM) of a set of positive integers is the smallest positive intege...2012-12-06 15:09:52 · 85 阅读 · 0 评论 -
hdu1021 推理规律
Fibonacci Again [url]http://acm.hdu.edu.cn/showproblem.php?pid=1021[/url] Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). ...2012-12-06 09:24:54 · 152 阅读 · 0 评论 -
hud1008 电梯 迭代模拟计算
Elevator [url]http://acm.hdu.edu.cn/showproblem.php?pid=1008[/url] Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers....2012-12-04 18:24:58 · 129 阅读 · 0 评论 -
hdu1001 求和
Sum Problem [url]http://acm.hdu.edu.cn/showproblem.php?pid=1001[/url] Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calc...2012-12-03 22:05:20 · 97 阅读 · 0 评论 -
hdu1000 A+B
A + B Problem [url]http://acm.hdu.edu.cn/showproblem.php?pid=1000[/url] Problem Description Calculate A + B. Input Each line will contain two integers A and B. [b][color=red]Process to end ...2012-12-03 18:37:12 · 91 阅读 · 0 评论 -
hdu2035 乘方取余
人见人爱A^B [url]http://acm.hdu.edu.cn/showproblem.php?pid=2035[/url] Problem Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1...2012-12-02 18:02:54 · 183 阅读 · 0 评论 -
hdu2034 差集
人见人爱A-B [url]http://acm.hdu.edu.cn/showproblem.php?pid=2034[/url] Problem Description 参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的减法运算。(当然,大家都知道集合的定义,就是同一个集合中不...2012-12-02 17:43:59 · 135 阅读 · 0 评论 -
hdu2033 时间计算
人见人爱A+B [url]http://acm.hdu.edu.cn/showproblem.php?pid=2033[/url] Problem Description HDOJ上面已经有10来道A+B的题目了,相信这些题目曾经是大家的最爱,希望今天的这个A+B能给大家带来好运,也希望这个题目能唤起大家对ACM曾经的热爱。 这个题目的A和B不是简单的整数,而是两个时间,A和B 都...2012-12-02 16:24:36 · 84 阅读 · 0 评论 -
HDU1003最大连续子序列和
Max Sum [url]http://acm.hdu.edu.cn/showproblem.php?pid=1003[/url] Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For exam...原创 2012-12-01 15:08:40 · 157 阅读 · 0 评论 -
hdu2081 字符串拼接
手机短号 [url]http://acm.hdu.edu.cn/showproblem.php?pid=2081[/url] Problem Description 大家都知道,手机号是一个11位长的数字串,同时,作为学生,还可以申请加入校园网,如果加入成功,你将另外拥有一个短号。假设所有的短号都是是 6+手机号的后5位,比如号码为13512345678的手机,对应的短号就是6456...2012-12-01 14:35:26 · 131 阅读 · 0 评论 -
poj1163 树型结构动态规划和最大路径
The Triangle [url]http://poj.org/problem?id=1163[/url] [url]http://acm.hdu.edu.cn/showproblem.php?pid=2084[/url] Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1)...2012-11-30 22:05:33 · 156 阅读 · 0 评论 -
POJ1579递归函数定义
Function Run Fun [url]http://poj.org/problem?id=1579[/url] Description We all love recursion! Don't we? Consider a three-parameter recursive function w(a, b, c): if a 20, then w(a, b, ...2012-11-30 21:58:34 · 132 阅读 · 0 评论 -
fhloj1050 足球赛
足球赛 源文件: a(.bas/.c/.cpp/.pas) 输入文件: a.in 输出文件: a.out 在小明的学校,足球是最受小朋友们欢迎的体育项目之一,班级之间常常会有足球比赛。有一天,小明所在的班级和另一个班级同往常一样,又进行了一场比赛。小朋友们在比赛过程中都玩得非常投入,以至于他们在比赛结束后忘记了比分。小明希望通过统计大家的进球信息来判断比赛的胜负(或者平局)。已知...2013-07-04 19:36:53 · 190 阅读 · 0 评论