随笔分类 -  ACM(JAVA版)

HDU 2084 数塔(DP)(JAVA版)
摘要:数塔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 阅读(1037) 评论(0) 推荐(0)
HDU 2001 计算两点间的距离(两点间的距离)(JAVA版)
摘要:计算两点间的距离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 阅读(451) 评论(0) 推荐(0)
POJ 2305 Basic remains(大数取模)(JAVA)
摘要: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 阅读(332) 评论(0) 推荐(0)
HDU 1063 Exponentiation(R的N次方)(Java版)
摘要: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 阅读(576) 评论(0) 推荐(0)
HDU A + B Problem II(高精度大数相加)(java版)
摘要: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 阅读(466) 评论(0) 推荐(0)
HDU 1089----1096 A+B for Input-Output Practice(简单题)(JAVA版)
摘要: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 阅读(3720) 评论(0) 推荐(0)