上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页
摘要: Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 30227 Accepted Submission(s): 14685 Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequ 阅读全文
posted @ 2013-10-23 22:53 龙腾四海365 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 86547 Accepted Submission(s): 20560 Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you .. 阅读全文
posted @ 2013-10-22 22:57 龙腾四海365 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Ignatius and the Princess IVTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Java/Others) Total Submission(s): 13419 Accepted Submission(s): 5419 Problem Description"OK, you are not too bad, em... But you can never pass the next test." feng5166 says."I will tell you 阅读全文
posted @ 2013-10-18 10:21 龙腾四海365 阅读(166) 评论(0) 推荐(0) 编辑
摘要: EncodingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 22110 Accepted Submission(s): 9687 Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k 阅读全文
posted @ 2013-10-17 21:21 龙腾四海365 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Uniform GeneratorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14213 Accepted Submission(s): 5562 Problem DescriptionComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed( 阅读全文
posted @ 2013-10-14 20:23 龙腾四海365 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Problem FTime Limit : 3000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 54Accepted Submission(s) : 6Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description在网络课程上,我学到了很多有关IP的知识。IP全称叫网际协议,有时我们又用IP来指代我们的IP网络地址,现在IPV4下用一个32位无符号整数来表示,一般用点分方式来显示,点将IP地 阅读全文
posted @ 2013-10-13 12:02 龙腾四海365 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Digital RootsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40786Accepted Submission(s): 12584Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then th 阅读全文
posted @ 2013-10-12 17:22 龙腾四海365 阅读(174) 评论(0) 推荐(0) 编辑
摘要: u Calculate eTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25494 Accepted Submission(s): 11312Problem DescriptionA simple mathematical formula for e iswhere n is allowed to go to infinity. This can actually yield very accurate approximations of 阅读全文
posted @ 2013-10-12 15:33 龙腾四海365 阅读(129) 评论(0) 推荐(0) 编辑
摘要: A+B Problem IV时间限制:1000 ms | 内存限制:65535 KB难度:3描述acmj最近发现在使用计算器计算高精度的大数加法时很不方便,于是他想着能不能写个程序把这个问题给解决了。输入包含多组测试数据 每组数据包含两个正数A,B(可能为小数且位数不大于400)输出每组输出数据占一行,输出A+B的结果,结果需要是最简的形式。样例输入1.9 0.10.1 0.91.23 2.13 4.0样例输出213.337来源hdu#include #include #define MAX 440int an1[MAX],an2[MAX],an3[MAX],an4[MAX];char st. 阅读全文
posted @ 2013-09-13 17:26 龙腾四海365 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 蛇形填数时间限制:3000 ms | 内存限制:65535 KB 难度:3描述 在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为:10 11 12 19 16 13 28 15 14 37 6 5 4输入 直接输入方陈的维数,即n的值。(n#include #define MAX 110int a[MAX][MAX];int main(){ int n; while(scanf("%d",&n)!=EOF) { int i,j,sum=0; memset(a,0,sizeof(a)); a[i=0][j=n-1]=sum=1; while( 阅读全文
posted @ 2013-08-22 17:02 龙腾四海365 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 次方求模时间限制:1000 ms | 内存限制:65535 KB 难度:3描述 求a的b次方对c取余的值输入 第一行输入一个整数n表示测试数据的组数(nint f(int a,int b,int c){ long long int t; if(b==0) return 1; if(b==1) return a%c; t=f(a,b/2,c)%c; t=(t*t)%c; if(b&1) t=t*a%c; return t; }int main(){ int cases; scanf("%d",&cases); while(cases--) { int a,b, 阅读全文
posted @ 2013-08-22 16:18 龙腾四海365 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 汉诺塔(一)时间限制:1000 ms | 内存限制:65535 KB难度:3描述在印度,有这么一个古老的传说:在世界中心贝拿勒斯(在印度北部)的圣庙里,一块黄铜板上插着三根宝石针。印度教的主神梵天在创造世界的时候,在其中一根针上从下到上地穿好了由大到小的64片金片,这就是所谓的汉诺塔。不论白天黑夜,总有一个僧侣在按照下面的法则移动这些金片:一次只移动一片,不管在哪根针上,小片必须在大片上面。僧侣们预言,当所有的金片都从梵天穿好的那根针上移到另外一根针上时,世界就将在一声霹雳中消灭,而梵塔、庙宇和众生也都将同归于尽。现在请你计算出起始有m个金片的汉诺塔金片全部移动到另外一个针上时需要移动的最.. 阅读全文
posted @ 2013-08-20 20:24 龙腾四海365 阅读(157) 评论(0) 推荐(0) 编辑
摘要: As Easy As A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29901Accepted Submission(s): 12789Problem DescriptionThese days, I am thinking about a question, how can I get a problem as easy as A+B? It is fairly difficulty to do such a thing. Of co 阅读全文
posted @ 2013-08-19 17:59 龙腾四海365 阅读(148) 评论(0) 推荐(0) 编辑
摘要: ElevatorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 34480 Accepted Submission(s): 18803Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which fl 阅读全文
posted @ 2013-08-19 17:10 龙腾四海365 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Big NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21214 Accepted Submission(s): 9549Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data 阅读全文
posted @ 2013-08-19 17:09 龙腾四海365 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页