自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 hdu 2138 How many prime numbers 大规模素数判断

How many prime numbers Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 Problem Description   Give yo

2015-08-22 16:20:33 372

原创 hdu 2502 月之数

月之数 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7861    Accepted Submission(s): 4641 Problem Description 当寒月还在读大一的时候,他在一本武林秘籍中(

2015-08-18 17:55:17 354

原创 大数乘法 poj 2389 ||大数乘法 hdu1402 FFT模板

poj 2389: code: #include #include #include #include using namespace std; int s[100]; void multiply(const char *a,const char *b) { int i,j,ca,cb; //int *s; ca=strlen(a); cb=strlen(b

2015-08-13 09:56:01 746

原创 hdu 盐水的故事

盐水的故事 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15156    Accepted Submission(s): 3694 Problem Description 挂盐水的时候,如果滴起来有规律,先是滴

2015-08-12 08:40:39 393

原创 hdu 1465 不容易系列之一

不容易系列之一 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16961    Accepted Submission(s): 7064 Problem Description 大家常常感慨,要做好一件事情真的不

2015-08-10 10:41:31 351

原创 hdu 1098 Ignatius's puzzle

原题链接 思路1:给出K,满足f(x)%65==0 的 a的最小值。 其中:65=13*5。要使f(x)是65的倍数,只需要f(x)是5和13的倍数即可。先来分析13的。 若f(x)是13的倍数, 有5*x^13+13*x^5+k*a*x % 13 == 0,其中13*x^5项显然不用考虑。 则只需5*x^13 + k*a*x是13的倍数,即x*(5*x^12+k*a)是13的倍数。若x

2015-08-09 17:28:21 361

原创 nyoj 1234 签到题

题意: 半径为R的大圆中是否 可以放置n个半径为r的小圆,且小圆贴着大圆的边缘放置 思路:半径为R的大圆中放置n个小圆 半径为r1,当r1>=r时满足题意, 上面那张图  构造三角形解边长 code: #include #include #include #include #include using namespace std; const double pi = 3.141

2015-08-09 15:11:31 684

原创 nyoj 1233 差值

点击打开链接 思路:在排序时将两个字符串前后组合-->s1s2 ,  s2s1 比较大小 见代码 code: #include #include #include #include #include #define maxx 10 using namespace std; int a[100000],b[100000],c[100000]; char * str_1 = ne

2015-08-09 11:22:22 557

原创 hdu 2199Can you solve this equation?

原题链接 code: 数学题要用数学方法解,在[0,100]上函数为单调增函数,二分,注意精度; #include #include double fun(double x) { return 8*pow(x,4) + 7*pow(x,3) + 2*pow(x,2) + 3*x + 6; } int main() { int cas; double y,y1,y

2015-08-08 08:41:01 405

原创 大数模小数

模板code: #include #include int mod(char *n1,int n2) { int tmp=0; int len=strlen(n1); for(int i=0; i<len; i++) { tmp=tmp*10+n1[i]-'0'; tmp=tmp%n2; } return tm

2015-08-05 19:11:15 550

原创 求位数 hdu 1018 Big Number

原题链接 (1).斯特林公式:log10(n!)=(0.5*log(2*PI*n)+n*log(n)-n)/log(10) , 这里利用了 log10 (N)=ln(N)/ln(10); code: #include #include #include #include #define PI 3.1415926 int main() { int T,digits,n; sca

2015-08-05 16:00:52 345

转载 cin等输入用法

1、cin  2、cin.get()  3、cin.getline()  4、getline()  5、gets()  6、getchar() 附:cin.ignore();cin.get()//跳过一个字符,例如不想要的回车,空格等字符 1、cin>>          用法1:最基本,也是最常用的用法,输入一个数字: #include   using nam

2015-08-05 10:12:43 402

原创 字符串处理 hdu 1048

原题链接 code: #include #include #include using namespace std; string s="VWXYZABCDEFGHIJKLMNOPQRSTU"; int main() { int a,b,i; string c; while(getline(cin,c)) { if(c=="ENDOFINPU

2015-08-05 09:53:56 818

原创 多校

MZL's xor Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 52    Accepted Submission(s): 42 Problem Description MZL loves xor very m

2015-08-04 18:20:40 358

原创 hdu 2091 输出技巧 空心三角形

hdu 原题链接 转:很多人可能不知道'*'在格式化输入输出中的作用。 在scanf()中,用%*#,就代表读入一个#的数据,但不处理。比如: scanf("%c%*c%c", &a, &b); 输入ABC,此时,变量a='A', c='C'。而中间的'B',只是读入,没有做任何处理。 在printf()中,%*#用来设定场宽。 我们平时用%2d一类的转义字符来代表输出整形d时

2015-08-04 18:04:45 399

原创 hdu 输出技巧 2099

整除的尾数 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 28344    Accepted Submission(s): 12015 Problem Description 一个整数,只知道前几位,不知道末二位

2015-08-04 10:45:02 365

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除