上一页 1 ··· 9 10 11 12 13 14 15 下一页

2011年10月5日

HDU 1271整数对

摘要: 整数对Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1006Accepted Submission(s): 357Problem DescriptionGardon 和小希玩了一个游戏,Gardon随便想了一个数A(首位不能为0),把它去掉一个数字以后得到另外一个数B,他把A和B的和N告诉了小希,让小希猜想他 原来想的数字。不过为了公平起见,如果小希回答的数虽然不是A,但同样能达到那个条件(去掉其中的一个数字得到B,A和B之和是N),一样算小 阅读全文

posted @ 2011-10-05 15:31 Goal 阅读(417) 评论(0) 推荐(1) 编辑

hdu 1568 Fibonacci

摘要: FibonacciTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1366Accepted Submission(s): 619Problem Description2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列(f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i>=2))的值全部给背了下来。接下来,CodeStar决定要考考他,于是每问他一个数字, 阅读全文

posted @ 2011-10-05 12:28 Goal 阅读(504) 评论(0) 推荐(0) 编辑

2011年10月1日

hdu 1250 Hat's Fibonacci

摘要: 杭电2010和2011级同学如何加入ACM集训队? Hat's FibonacciTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3014Accepted Submission(s): 999Problem DescriptionA Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two me 阅读全文

posted @ 2011-10-01 14:30 Goal 阅读(235) 评论(0) 推荐(0) 编辑

hdu 3450 Counting Sequences

摘要: Counting SequencesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/65536 K (Java/Others)Total Submission(s): 786Accepted Submission(s): 262Problem DescriptionFor a set of sequences of integers{a1,a2,a3,...an}, we define a sequence{ai1,ai2,ai3...aik}in which 1<=i1<i2<i3<...<ik 阅读全文

posted @ 2011-10-01 13:51 Goal 阅读(321) 评论(0) 推荐(0) 编辑

hdu 3030 Increasing Speed Limits

摘要: Increasing Speed LimitsTime Limit: 2000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 224Accepted Submission(s): 117Problem DescriptionYou were driving along a highway when you got caught by the road police for speeding. It turns out that they\'ve been follo 阅读全文

posted @ 2011-10-01 10:59 Goal 阅读(643) 评论(0) 推荐(1) 编辑

2011年9月30日

hdu 1133 Buy the Ticket

摘要: Buy the TicketTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1911Accepted Submission(s): 795Problem DescriptionThe "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to 阅读全文

posted @ 2011-09-30 21:34 Goal 阅读(1138) 评论(0) 推荐(0) 编辑

2011年9月29日

hdu 4046 Panda

摘要: PandaTime Limit: 10000/4000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 674Accepted Submission(s): 245Problem DescriptionWhen I wrote down this letter, you may have been on the airplane to U.S. We have known for 15 years, which has exceeded one-fifth of my whole lif 阅读全文

posted @ 2011-09-29 20:04 Goal 阅读(415) 评论(0) 推荐(0) 编辑

poj 3321 Apple Tree

摘要: Apple TreeTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 11541Accepted: 3330DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.The tree has N f 阅读全文

posted @ 2011-09-29 18:36 Goal 阅读(291) 评论(0) 推荐(0) 编辑

2011年9月28日

hdu 3333 Turing Tree

摘要: 杭电2010和2011级同学如何加入ACM集训队? Turing TreeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1559Accepted Submission(s): 497Problem DescriptionAfter inventing Turing Tree, 3xian always felt boring when solving problems about intervals, because Turing Tree. 阅读全文

posted @ 2011-09-28 20:52 Goal 阅读(486) 评论(0) 推荐(0) 编辑

2011年9月27日

求欧拉函数

摘要: #include <cstdlib>#include <iostream>using namespace std;int phi(int n){ int phi=n; for(int i=2,j=4;j<=n;i++,j+=i+i-1)if(!(n%i)){ phi=phi/i*(i-1);//这里用j+=i+i-1来优化很奇妙,不知道为什么? while(!(n%i)) n/=i; } if(n>1) phi= phi/n*(n-1); return phi;}int main(int argc, char *argv[]){ int a; while(s 阅读全文

posted @ 2011-09-27 20:13 Goal 阅读(144) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13 14 15 下一页

导航