摘要:        
对于本题的因数m,只需要将其化为素因子的乘积形式,其中每一个素因子的个数为mi,之后只需要求得每一个素因子pi在组合数中的个数Ci,然后将取Ci/mi中的最小的那个,就是该因数在组合数中的个数。代码如下:/* * fafu1079.c * * Created on: 2011-10-9 * Author: bjfuwangzhu */#include<stdio.h>#include<string.h>#include<math.h>#define nmax 31625int flag[nmax], prime[nmax], pfactor[nmax], c    阅读全文
        
            posted @ 2011-10-09 21:24
qingyezhu
阅读(295)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
/* * hdu2199.c * * Created on: 2011-10-9 * Author: bjfuwangzhu */#include<stdio.h>#include<math.h>#define eps 1.0e-10double f(double x) { return 8.0 * pow(x, 4.0) + 7.0 * pow(x, 3.0) + 2.0 * pow(x, 2.0) + 3 * x + 6;}void solve(double y) { double left, right, mid; left = 0.0, right = 1...    阅读全文
        
            posted @ 2011-10-09 19:56
qingyezhu
阅读(168)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
/* * hdu2141.c * * Created on: 2011-10-9 * Author: bjfuwangzhu */#include<stdio.h>#include<stdlib.h>#define nmax 5001#define nnum 250001#define LL long longLL numL[nmax], numN[nmax], numM[nmax], numLN[nnum];int cmp(const void *a, const void *b) { LL temp = *(LL *) a - *(LL *) b; if (temp    阅读全文
        
            posted @ 2011-10-09 19:55
qingyezhu
阅读(213)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
/* * hdu1969.c * * Created on: 2011-10-9 * Author: bjfuwangzhu */#include<stdio.h>#include<stdlib.h>#include<math.h>#define nmax 10010#define pi acos(-1.0)#define eps 1.0e-5double volume[nmax];int cmp(int n, double aver) { int i, temp; for (i = 0, temp = 0; i < n; i++) { temp +=    阅读全文
        
            posted @ 2011-10-09 19:53
qingyezhu
阅读(166)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
/* * hdu1511.c * * Created on: 2011-10-9 * Author: bjfuwangzhu */#include<stdio.h>#include<math.h>#define eps 1.0e-8#define nmax 10001double num[nmax];int cmp(int n, double aver) { int i, temp; for (i = 0, temp = 0; i < n; i++) { temp += (int) (num[i] / aver); } return temp;...    阅读全文
        
            posted @ 2011-10-09 19:52
qingyezhu
阅读(363)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
/* * hdu2899.c * * Created on: 2011-10-9 * Author: bjfuwangzhu */#include<stdio.h>#include<math.h>#define eps 1.0e-8double ff(double x, double y) { return 42.0 * pow(x, 6.0) + 48.0 * pow(x, 5.0) + 21.0 * pow(x, 2.0) + 10.0 * x - y;}double f(double x, double y) { return 6.0 * p...    阅读全文
        
            posted @ 2011-10-09 14:27
qingyezhu
阅读(166)
评论(0)
推荐(0)
        
        
 
                     
                    
                 
                    
                
 
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号