上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: http://blog.csdn.net/xuzengqiang/article/details/7476671http://blog.csdn.net/shiren_bod/article/details/5664934 阅读全文
posted @ 2015-07-19 18:38 JoneZP 阅读(58) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn the Fibonacci integer sequence, F_0 = 0, F_1 = 1, and F_n = F_{n-1} + F_{n-2} for n \geq 2. For example, the first ten terms of the Fibo... 阅读全文
posted @ 2015-07-19 18:31 JoneZP 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 long long euler_phi(int n) 2 { 3 int m=(int)sqrt(n+0.5); 4 int ans=n; 5 for(int i=2;i1)ans=ans/n*(n-1);14 return ans;15 }Descriptio... 阅读全文
posted @ 2015-07-19 18:25 JoneZP 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1 scanf("%s%d",a,&b);2 int len=strlen(a);3 int ans=0;4 for(int i=st;i 0, b fits into a 32 bit signed integer). Numbers will not contain leading zeroes... 阅读全文
posted @ 2015-07-19 18:22 JoneZP 阅读(680) 评论(0) 推荐(0) 编辑
摘要: 1 long long x,y,gcd; 2 void extend_gcd(long long a, long long b) 3 { 4 if(b == 0) 5 { 6 x = 1; 7 y = 0; 8 gcd = a; 9... 阅读全文
posted @ 2015-07-19 18:16 JoneZP 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 线性筛更快。1.埃氏筛法1 int m=sqrt(n+0.5);2 memset(vis,0,sizeof(vis));3 for(int i=2;i 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 in... 阅读全文
posted @ 2015-07-19 18:11 JoneZP 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4565这个博客讲的比较好:http://blog.csdn.net/ljd4305/article/details/8987823题意:给定a,b,,n,m,求Sn 1 #include 2 #incl... 阅读全文
posted @ 2015-07-19 10:53 JoneZP 阅读(167) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you want to take 2 of... 阅读全文
posted @ 2015-07-18 00:09 JoneZP 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 猜数字Time Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3373Accepted Submission(s): 1975Problem Descr... 阅读全文
posted @ 2015-07-16 21:18 JoneZP 阅读(357) 评论(0) 推荐(0) 编辑
摘要: How Many Equations Can You FindTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 691Accepted Submiss... 阅读全文
posted @ 2015-07-16 11:58 JoneZP 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页