上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 数塔Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10219Accepted Submission(s): 6119Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗?Input输入数据首先包括一个整数C,表示测试... 阅读全文
posted @ 2012-05-26 12:30 Stephen Li 阅读(1013) 评论(0) 推荐(0) 编辑
摘要: 计算两点间的距离Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51606Accepted Submission(s): 19567Problem Description输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。Output对于每组输入数据,输出一行,结果保留两位小数。Sample ... 阅读全文
posted @ 2012-05-26 01:36 Stephen Li 阅读(439) 评论(0) 推荐(0) 编辑
摘要: Basic remainsTime Limit:1000MSMemory Limit:65536KTotal Submissions:4076Accepted:1707DescriptionGiven a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such that p = a*m + k for so 阅读全文
posted @ 2012-05-25 17:13 Stephen Li 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 初学Java许多函数需要学,需要了解,Java的确太强大了,下面介绍一下Integer类----toString函数的作用toString方法---- 生成整数的十进制字符串 返回一个表示制定整数的String对象,将该参数转换为有符号的十进制表形式,以字符串形式返回它,就好像将参数和基数10作为参数赋予toString(int,int),方法。方法声明1Public static String toSring(int i);入口参数:i为表示要转换成字符串的整数;返回值:十进制(基数10)参数的字符串表示形式,下面举个例子:创建Integer对象,并通过toString()方法获取到整数17 阅读全文
posted @ 2012-05-25 16:47 Stephen Li 阅读(4286) 评论(0) 推荐(0) 编辑
摘要: ExponentiationTime Limit: 1000/500 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3847Accepted Submission(s): 1015Problem DescriptionProblems involvingthe computation of exact values of very large magnitude and precision arecommon. For example, the computation of the n 阅读全文
posted @ 2012-05-23 00:40 Stephen Li 阅读(550) 评论(0) 推荐(0) 编辑
摘要: A + B Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 112635Accepted Submission(s): 2133Problem DescriptionI have a verysimple problem for you. Given two integers A and B, your job is to calculatethe Sum of A + B.InputThe first line ofthe 阅读全文
posted @ 2012-05-20 16:09 Stephen Li 阅读(458) 评论(0) 推荐(0) 编辑
摘要: 1089 A+B for Input-Output Practice (I)Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43745Accepted Submission(s): 24698Problem DescriptionYour task is toCalculate a + b.Too easy?! Of course! I specially designed the problem for acm beginners.You m 阅读全文
posted @ 2012-05-20 15:54 Stephen Li 阅读(3709) 评论(0) 推荐(0) 编辑
摘要: 做ACM已经一年多了,想着个暑假想搞Android,组个团队弄点Android有关的东西,其实我还是挺喜欢ACM的,上个星期省赛结束后,老师找我们谈了一下以后的打算,说句实话省赛得确有点遗憾。实验室是一个高度做ACM的环境,而我想做点别的的同时兼顾ACM,但是我感觉这样我拍自己兼顾不了而且这样也免扰乱集训队的AC氛围。,所以我选择了退出集训队,退队的原因还有其他方面,就是今年暑假得确定是否考研或大学的确定走哪条路,因为我们学校没有保研,这是和好学校最大的劣势,如果能保研,虽然我现在在队里做的比较差、刷题进度比较慢,但是我愿意坚持做ACM四年,这样肯定能取得自己想要的成果。现在让我完全放弃ACM 阅读全文
posted @ 2012-05-20 14:51 Stephen Li 阅读(442) 评论(3) 推荐(0) 编辑
摘要: BalanceTime Limit:1000MSMemory Limit:30000KTotal Submissions:6667Accepted:4013DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.It orders two arms of negligible weight and each arm's length is 15. Some h 阅读全文
posted @ 2012-05-14 21:32 Stephen Li 阅读(317) 评论(0) 推荐(0) 编辑
摘要: Center of symmetryTime Limit:1000MSMemory Limit:65536KTotal Submissions:2190Accepted:972Description Given is a set of n points with integer coordinates. Your task is to decide whether the set has a center of symmetry.A set of points S has the center of symmetry if there exists a point s (notnecessar 阅读全文
posted @ 2012-05-11 20:47 Stephen Li 阅读(508) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页