上一页 1 ··· 89 90 91 92 93 94 95 96 97 ··· 119 下一页
摘要: 1437: 校长杯Time Limit: 1500 ms Memory Limit: 32000 kB Judge type: Multi-cases Special JudgeTotal Submit : 110(53 users)Accepted Submit : 67(47 users)Pa... 阅读全文
posted @ 2012-08-21 08:30 加拿大小哥哥 阅读(874) 评论(5) 推荐(0)
摘要: 1 // 结果超过了long long,到32就超了 2 #include <iostream> 3 #include <cstring> 4 using namespace std; 5 long long fun(int a,int b) 6 { 7 //if(0==b) 8 //return 1; 9 if(1==b)10 return a;11 //本以为会因尽快结束上城循环而加快速度,,谁知执行到return直接跳出函数 12 long long temp;13 temp = fun(a,b/2);14 ... 阅读全文
posted @ 2012-08-20 20:05 加拿大小哥哥 阅读(308) 评论(0) 推荐(0)
摘要: Catch That CowTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 31637Accepted: 9740DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K (0 ≤ K ≤ 100, 阅读全文
posted @ 2012-08-20 17:47 加拿大小哥哥 阅读(226) 评论(0) 推荐(1)
摘要: Hat’s WordsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3779Accepted Submission(s): 1432Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all the ha 阅读全文
posted @ 2012-08-20 11:56 加拿大小哥哥 阅读(323) 评论(0) 推荐(0)
摘要: View Code 1 //hdu2087 2 #include <iostream> 3 #include <string> 4 #include <cstring> 5 using namespace std; 6 string str1,str2; 7 int next[1005]; 8 void get() 9 {10 int i = 0;11 int j = -1;12 memset(next,0,sizeof(next));13 next[0] = -1;//不加的话会死循环,因为 j = next[j](j=0) 会赋一个垃圾数字 14 ... 阅读全文
posted @ 2012-08-17 18:17 加拿大小哥哥 阅读(493) 评论(0) 推荐(0)
摘要: The CastleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 5557Accepted: 3129Description 1 2 3 4 5 6 7 ############################# 1 # | # | # | | # #####---#####---#---#####---# 2 # # | # # # # # #---#####---#####---#####---# 3 # | |... 阅读全文
posted @ 2012-08-17 15:15 加拿大小哥哥 阅读(355) 评论(0) 推荐(0)
摘要: Number SequenceTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6111Accepted Submission(s): 2744Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 100 阅读全文
posted @ 2012-08-17 14:36 加拿大小哥哥 阅读(461) 评论(0) 推荐(0)
摘要: #include<stdio.h>#include<math.h>#define PI 3.14159265int num,ans;void count_factorial(){ double t; t = (num*log(num) - num + 0.5*log(2*num*PI))/log(10); ans= (int)t+1; printf("%d\n",ans);}int main(){ int i,n; scanf("%d",&n); for( i=1 ; i<=n ; i++ ) { scanf(&qu 阅读全文
posted @ 2012-08-16 21:39 加拿大小哥哥 阅读(235) 评论(0) 推荐(0)
摘要: //123*20 相当于 100*20 + 20*20+3 //常规方法N>=13就溢出 #include<stdio.h>#include<string.h>#include<stdlib.h>#define N 10000//因为每位里存储的是小于10000的数,所以缩小4倍 int vis[N];int main(){ int i,j,m; int c,temp; while(scanf("%d",&m)!=EOF) //scanf("%d",&m); { memset(vis,0,size 阅读全文
posted @ 2012-08-16 21:14 加拿大小哥哥 阅读(264) 评论(0) 推荐(0)
摘要: Terrible SetsTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2428Accepted: 1215DescriptionLet N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elements in N, and w0 = 0. Define set B = {< x, y > | x, y ∈ 阅读全文
posted @ 2012-08-16 20:22 加拿大小哥哥 阅读(4614) 评论(0) 推荐(3)
上一页 1 ··· 89 90 91 92 93 94 95 96 97 ··· 119 下一页