雕刻时光

just do it……nothing impossible
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年9月19日

摘要: 推出公式;f[0]=1f[1]=1/2*f[0]f[2]=1/4*(f[0]+f[1])f[3]=1/6*(f[0]+f[1]+f[2])f[4]=1/8*(f[0]+f[1]+f[2]+f[3])……JAVA处理View Code import java.util.*;import java.math.*;public class Main { public static void main(String args[]) { Scanner cin=new Scanner(System.in); BigInteger a[],temp,all,fenz... 阅读全文

posted @ 2011-09-19 21:14 huhuuu 阅读(241) 评论(0) 推荐(0) 编辑

摘要: 排列组合的公式推出来比较简单剩下(x/y)%MOD=z 求z比较麻烦先temp=x%MOD再循环i=0->N直到: (temp+i*MOD)%y==0 z=(temp+i*MOD)/yView Code #include<stdio.h>#include<iostream>#include<algorithm>using namespace std;const long long MOD=1000000007;struct data{ int no; char s;}node[109];long long Mon(long long n,long lo 阅读全文

posted @ 2011-09-19 19:46 huhuuu 阅读(241) 评论(0) 推荐(0) 编辑