上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 66 下一页
摘要: Free DIY TourTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1135Accepted Submission(s): 381Problem DescriptionWeiwei is a software engineer of ShiningSoft. He has just excellently fulfilled a software project with his fellow workers. His boss is.. 阅读全文
posted @ 2011-08-31 22:51 沐阳 阅读(669) 评论(0) 推荐(0) 编辑
摘要: Super Jumping! Jumping! Jumping!Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9547Accepted Submission(s): 3918Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good 阅读全文
posted @ 2011-08-31 20:57 沐阳 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 这里主要预习了素数筛选以及输入外挂的编写。涛神的筛选法一直记着,给力。 #include <cstdio>#include <cstring>#include <cstdlib>using namespace std;char hash[16005] = {0};bool getint( int &t ){ char c; int f = 1; while( c = getchar(), c != '-' && ( c < '0' || c > '9' ) ) { if( c 阅读全文
posted @ 2011-08-29 21:22 沐阳 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Calculate the formulaTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3836Accepted Submission(s): 1126Problem DescriptionYou just need to calculate the sum of the formula: 1^2+3^2+5^2+……+ n ^2.InputIn each case, there is an odd positive integer n.Ou 阅读全文
posted @ 2011-08-29 20:19 沐阳 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 模拟题。 代码如下:#include <cstdio>#include <cstring>#include <cstdlib>using namespace std;char q[2000];int main(){ while( gets( q ) ) { char * t, *p; int len = strlen( q ); t = q; while ( 1 ) { if( p = strchr( t, '?' ) ) { ... 阅读全文
posted @ 2011-08-29 15:07 沐阳 阅读(209) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3257 刚开始没有弄明白哪些十六进制数的意义,后来才恍然大悟,原来就是一个七行有无 '#' 二进制的表示,知道了这个后就比较简单了。 代码如下: 1 #include <cstring> 2 #include <cstdlib> 3 #include <cstdio> 4 using namespace std; 5 6 int num[85][10], base[10]; 7 8 int main() 9 {10 for( int i = 0; i < 阅读全文
posted @ 2011-08-29 13:38 沐阳 阅读(346) 评论(0) 推荐(0) 编辑
摘要: I Love You TooTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 865Accepted Submission(s): 531Problem DescriptionThis is atrue story. A man showed his love to a girl,but the girl didn't replied clearly ,just gave him a Morse Code:****-/*----/---- 阅读全文
posted @ 2011-08-29 12:49 沐阳 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 亲和串Time Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2427Accepted Submission(s): 1080Problem Description人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。亲和串的定义是这样的:给定两个.. 阅读全文
posted @ 2011-08-29 01:38 沐阳 阅读(634) 评论(0) 推荐(0) 编辑
摘要: 由于该题是求一个数是不是“自身数”,而定义一个数是不是“自身数”的根据就是是否有祖先,又因为一个数的祖先一定比这个数要小,所以这就和筛选法很像了。 代码如下: 1 #include <cstring> 2 #include <cstdlib> 3 #include <cstdio> 4 using namespace std; 5 6 char hash[1000005]; 7 8 void deal( int x ) 9 {10 int rec = x;11 while( x > 0 )12 {13 int c = x % 10;14 ... 阅读全文
posted @ 2011-08-29 00:44 沐阳 阅读(821) 评论(0) 推荐(0) 编辑
摘要: 月之数Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2744Accepted Submission(s): 1585Problem Description当寒月还在读大一的时候,他在一本武林秘籍中(据后来考证,估计是计算机基础,狂汗-ing),发现了神奇的二进制数。如果一个正整数m表示成二进制,它的位数为n(不包含前导0),寒月称它为一个n二进制数。所有的n二进制数中,1的总个数被称为n对应的月之数。例如,3二进制数总共有4个,分别是4(10 阅读全文
posted @ 2011-08-28 23:38 沐阳 阅读(874) 评论(0) 推荐(0) 编辑
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 66 下一页