poj2084 Game of Connections
来源:互联网 发布:卸载root权限软件 编辑:程序博客网 时间:2024/06/11 21:53
Catalan数,组合数学书上有公式。
import java.math.*; import java.io.*; import java.util.*; public class Main { public static void main(String [] args){ Scanner cin = new Scanner(System.in); BigInteger a[] = new BigInteger[101]; a[0] = BigInteger.ONE; for(int i=1; i<=100; ++i){ a[i] = a[i-1].multiply(BigInteger.valueOf(4*i-2)).divide(BigInteger.valueOf(i+1)); } while(cin.hasNext()){ int n= cin.nextInt(); if(n==-1) break; System.out.println(a[n]); } } }
- poj2084 Game of Connections
- poj2084 Game of Connections
- NYOJ---164 &&HDOJ1134&&POJ2084 --> Game of Connections
- POJ2084 Game of Connections(catalan数)
- POJ2084——Game of Connections
- POJ2084—Game of Connections(c++高精度)
- poj2084 Game of Connections(Catalan)
- nyoj 164&&poj2084 Game of Connections 【卡特兰】
- nyoj 164&&poj2084 Game of Connections 【卡特兰
- 1134 ---( Game of Connections )
- hdu1134-Game of Connections
- Game of Connections
- acm-Game of Connections
- Game of Connections
- HDU1134 Game of Connections
- Game of Connections
- WOJ1268-Game of Connections
- Game of Connections HDU
- POJ3321:Apple Tree
- ASIHTTPRequest系列(一):同步和异步请求
- ASIHTTPRequest系列(二):文件下载
- 易用的C++ RPC服务框架 - pioneer - 4 - 技术实现:函数的序列化
- ASIHTTPRequest系列(三):文件上传
- poj2084 Game of Connections
- MathContext的例子
- poj1833 排列
- 一步一步学数据结构之1--n(二叉树遍历--四种方法--递归式)
- mmc换硬币问题
- vi / vim 删除以及其它命令
- 易用的C++ RPC服务框架 - pioneer - 5 - 技术实现:函数的序列化
- 【转载】Android基于HTTP header的用户Authentication
- leetcode length of last word