Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!

2011年12月3日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1069类似于最长下降子序列我的代码 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 const int N=100; 5 struct block 6 { 7 int x,y,z; 8 }a[N]; 9 int f[N];10 int cmp(const void *a,const void *b)11 {12 return ((block*)b)->x - ((block*)a)- 阅读全文
posted @ 2011-12-03 22:10 Qiuqiqiu 阅读(179) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1063高精度我的代码 1 #include <stdio.h> 2 #include <string.h> 3 4 const int base=10; 5 int a[200],b[10]; 6 void mult2(int *a,int *b) 7 { 8 int i,j; 9 for (i=a[0];i>0;i--)10 {11 for (j=b[0];j>1;j--) a[i+j-1]+=a[i]*b[j];12 a[i]*=b[1];13 ... 阅读全文
posted @ 2011-12-03 17:54 Qiuqiqiu 阅读(197) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1133我的代码 1 #include <stdio.h> 2 #include <string.h> 3 4 const int N=101,base=10000000; 5 int f[N][N][N]; 6 void plus(int *a,int *b) 7 { 8 int i; 9 if (b[0]>a[0]) a[0]=b[0];10 for (i=1;i<=a[0];i++)11 {12 a[i]+=b[i];13 if (a[i]... 阅读全文
posted @ 2011-12-03 16:00 Qiuqiqiu 阅读(326) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1134高精度卡塔兰数我的代码 1 //HDU 1134 2 3 #include <stdio.h> 4 const int base=10000000; 5 int a[100]; 6 void mult(int *a,int b) 7 { 8 int i; 9 a[1]*=b;10 for (i=2;i<=a[0];i++)11 {12 a[i]=a[i]*b+a[i-1]/base;13 a[i-1]%=base;14 }15 ... 阅读全文
posted @ 2011-12-03 15:44 Qiuqiqiu 阅读(219) 评论(0) 推荐(0) 编辑