扩大
缩小

2012年7月27日

HDUOJ1021 Fibonacci Again

摘要: Fibonacci AgainTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 21187Accepted Submission(s): 10145Problem 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 sequence 阅读全文

posted @ 2012-07-27 22:48 LinuxPanda 阅读(200) 评论(0) 推荐(0) 编辑

HDUOJ3782 xxx定律

摘要: xxx定律Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 879Accepted Submission(s): 706Problem Description对于一个数n,如果是偶数,就把n砍掉一半;如果是奇数,把n变成 3*n+ 1后砍掉一半,直到该数变为1为止。请计算需要经过几步才能将n变到1,具体可见样例。Input测试包含多个用例,每个用例包含一个整数n,当n为0 时表示输入结束。(1<=n<=10000)Output对于每组 阅读全文

posted @ 2012-07-27 22:44 LinuxPanda 阅读(172) 评论(0) 推荐(0) 编辑

HDUOJ3201 Build a Fence

摘要: Build a FenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 676Accepted Submission(s): 521Problem DescriptionThere is a wall in your backyard. It is so long that you can’t see its endpoints. You want to build a fence of length L such that the area 阅读全文

posted @ 2012-07-27 22:42 LinuxPanda 阅读(163) 评论(0) 推荐(0) 编辑

HDUOJ1877 又一版 A+B

摘要: 又一版 A+BTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9541Accepted Submission(s): 3551Problem Description输入两个不超过整型定义的非负10进制整数A和B(<=231-1),输出A+B的m (1 < m <10)进制数。Input输入格式:测试输入包含若干测试用例。每个测试用例占一行,给出m和A,B的值。当m为0时输入结束。Output输出格式:每个测试用例的输出占一行, 阅读全文

posted @ 2012-07-27 22:41 LinuxPanda 阅读(284) 评论(0) 推荐(0) 编辑

HDUOJ1004Let the Balloon Rise

摘要: Let the Balloon RiseTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43330Accepted Submission(s): 15252Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time 阅读全文

posted @ 2012-07-27 22:39 LinuxPanda 阅读(117) 评论(0) 推荐(0) 编辑

HDUOJ1234开门人和关门人

摘要: 开门人和关门人Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7168Accepted Submission(s): 3667Problem Description每天第一个到机房的人要把门打开,最后一个离开的人要把门关好。现有一堆杂乱的机房签到、签离记录,请根据记录找出当天开门和关门的人。Input测试输入的第一行给出记录的总天数N ( > 0 )。下面列出了N天的记录。每天的记录在第一行给出记录的条目数M ( > 0 ),下面是 阅读全文

posted @ 2012-07-27 22:38 LinuxPanda 阅读(364) 评论(0) 推荐(0) 编辑

HDUOJ1002A + B Problem II

摘要: A + B Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 120188Accepted Submission(s): 22865Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of 阅读全文

posted @ 2012-07-27 22:36 LinuxPanda 阅读(162) 评论(0) 推荐(0) 编辑

HDUOJ1005Number Sequence

摘要: Number SequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 61101Accepted Submission(s): 13923Problem 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 are to 阅读全文

posted @ 2012-07-27 22:34 LinuxPanda 阅读(156) 评论(0) 推荐(0) 编辑

HDUOJ2115I Love This Game

摘要: I Love This GameTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3600Accepted Submission(s): 1234Problem DescriptionDo you like playing basketball ? If you are , you may know the NBA Skills Challenge . It is the content of the basketball skills . It 阅读全文

posted @ 2012-07-27 22:33 LinuxPanda 阅读(150) 评论(0) 推荐(0) 编辑

HDUOJ1860 统计字符

摘要: 统计字符Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5381Accepted Submission(s): 3346Problem Description统计一个给定字符串中指定的字符出现的次数Input测试输入包含若干测试用例,每个测试用例包含2行,第1行为一个长度不超过5的字符串,第2行为一个长度不超过80的字符串。注意这里的字符串包含空格,即空格也可能是要求被统计的字符之一。当读到'#'时输入结束,相应的结果不要输出。 阅读全文

posted @ 2012-07-27 22:31 LinuxPanda 阅读(286) 评论(0) 推荐(0) 编辑

HDUOJ2014 青年歌手大奖赛_评委会打分

摘要: 青年歌手大奖赛_评委会打分Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 27370Accepted Submission(s): 13178Problem Description青年歌手大奖赛中,评委会给参赛选手打分。选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分。Input输入数据有多组,每组占一行,每行的第一个数是n(2<n<=100),表示评委的人数,然后是n个评委的打分。Output对于 阅读全文

posted @ 2012-07-27 22:30 LinuxPanda 阅读(414) 评论(0) 推荐(0) 编辑

HDUOJ1000 A+B Problem

摘要: A+B ProblemTime Limit:1000MSMemory Limit:10000KTotal Submissions:260754Accepted:141561DescriptionCalculate a+bInputTwo integer a,b (0<=a,b<=10)OutputOutput a+bSample Input1 2Sample Output3View Code #include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); printf(" 阅读全文

posted @ 2012-07-27 22:26 LinuxPanda 阅读(211) 评论(0) 推荐(0) 编辑

HDUOJ3981字符串替换

摘要: 字符串替换Time Limit:1000MSMemory Limit:65536KTotal Submissions:7285Accepted:3448Description编写一个C程序实现将字符串中的所有"you"替换成"we"Input输入包含多行数据每行数据是一个字符串,长度不超过1000数据以EOF结束Output对于输入的每一行,输出替换后的字符串Sample Inputyou are what you doSample Outputwe are what we doView Code #include<stdio.h>#incl 阅读全文

posted @ 2012-07-27 22:25 LinuxPanda 阅读(161) 评论(0) 推荐(0) 编辑

HDUOJ3980取模运算

摘要: 取模运算Time Limit:1000MSMemory Limit:65536KTotal Submissions:7836Accepted:4806Description编写一个C函数mod(int n, int m),实现取模运算%Input输入包含多行数据每行数据是两个整数a, b (1 <= a, b <= 32767)数据以EOF结束Output于输入的每一行输出a%bSample Input5 3100 2Sample Output20View Code #include<stdio.h>int main(){ int a,b; while(scanf(&q 阅读全文

posted @ 2012-07-27 22:23 LinuxPanda 阅读(230) 评论(0) 推荐(0) 编辑

HDUOJ 2636 Electrical Outlets

摘要: Electrical OutletsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7456Accepted:5699DescriptionRoy has just moved into a new apartment. Well, actually the apartment itself is not very new, even dating back to the days before people had electricity in their houses. Because of this, Roy's apa 阅读全文

posted @ 2012-07-27 22:21 LinuxPanda 阅读(181) 评论(0) 推荐(0) 编辑

HDUOJ Calendar

摘要: CalendarTime Limit:1000MSMemory Limit:30000KTotal Submissions:9036Accepted:3390DescriptionA calendar is a system for measuring time, from hours and minutes, to months and days, and finally to years and centuries. The terms of hour, day, month, year and century are all units of time measurements of a 阅读全文

posted @ 2012-07-27 22:19 LinuxPanda 阅读(193) 评论(0) 推荐(0) 编辑

HDUOJ Metric Time

摘要: Metric TimeTime Limit:1000MSMemory Limit:65536KTotal Submissions:2479Accepted:759DescriptionThe Metric Time is one of the most important points of PSOS Election Programme. The Time can be much easier calculated in operating systems. These systems are then more stable, which meets the main goal of th 阅读全文

posted @ 2012-07-27 22:16 LinuxPanda 阅读(187) 评论(0) 推荐(0) 编辑

NYOJ24素数距离问题

摘要: 素数距离问题时间限制:3000ms | 内存限制:65535KB难度:2描述现在给出你一些数,要求你写出一个程序,输出这些整数相邻最近的素数,并输出其相距长度。如果左右有等距离长度素数,则输出左侧的值及相应距离。如果输入的整数本身就是素数,则输出该素数本身,距离输出0输入第一行给出测试数据组数N(0<N<=10000)接下来的N行每行有一个整数M(0<M<1000000),输出每行输出两个整数 A B.其中A表示离相应测试数据最近的素数,B表示其间的距离。样例输入36810样例输出5 17 111 1View Code #include <stdio.h>i 阅读全文

posted @ 2012-07-27 22:09 LinuxPanda 阅读(169) 评论(0) 推荐(0) 编辑

NYOJ243交换输出

摘要: 交换输出时间限制:3000ms | 内存限制:65535KB难度:1描述输入n(n<100)个数,找出其中最小的数,将它与最前面的数交换后输出这些数。(如果这个第一个数就是最小的数,则保持原样输出,如果最小的数有相同的按照前面的交换)输入输入数据有多组,每组占一行,每行的开始是一个整数n,表示这个测试实例的数值的个数,跟着就是n个整数。n=0表示输入的结束,不做处理。输出对于每组输入数据,输出交换后的数列,每组输出占一行。样例输入4 2 1 3 45 5 4 3 2 10样例输出1 2 3 41 4 3 2 5View Code #include <stdio.h>int m 阅读全文

posted @ 2012-07-27 22:08 LinuxPanda 阅读(181) 评论(0) 推荐(0) 编辑

NYOJ33蛇形填数

摘要: 蛇形填数时间限制:3000ms | 内存限制:65535KB难度:3描述在n*n方陈里填入1,2,...,n*n,要求填成蛇形。例如n=4时方陈为:10 11 12 19 16 13 28 15 14 37 6 5 4输入直接输入方陈的维数,即n的值。(n<=100)输出输出结果是蛇形方陈。样例输入3样例输出7 8 16 9 25 4 3View Code #include <stdio.h>#define N 100int a[N][N];int main(){ int n,x,y,p,i; scanf("%d",&n); p=1; x=0; y 阅读全文

posted @ 2012-07-27 22:07 LinuxPanda 阅读(143) 评论(0) 推荐(0) 编辑

导航