UVA 7360 run step(组合数学)
来源:互联网 发布:数据库三级是工程师吗 编辑:程序博客网 时间:2024/05/29 17:15
#include<stdio.h> long long C(int a,int b){ long long ans=1; for(int i=0;i<b;i++) { ans*=(a-i); ans/=i+1; } return ans;}int main(){ int t; int n; int i,j,k,x,m; scanf("%d",&t); while(t--) { unsigned long long sum=0; scanf("%d%d",&x,&n); m=n/2; int yi=0,er=m; while(1) { if(yi>er) break; if(er%2) { er--; yi+=2; continue; } int oo=er/2; int jj=yi/2; sum+=C((oo+jj),jj)*C((oo+jj),jj); er--; yi+=2; } printf("%d %lld",x,sum); } return 0;}
0 0
- UVA 7360 run step(组合数学)
- UVALive 7360 Run Step (JAVA阶乘求组合数)
- uva 11538 组合数学
- UVA 19889 组合数学
- uva 11609 组合数学
- UVA 11609 (组合数学)
- UVa 11609 Teams (组合数学)
- UVa 10237 Bishops (组合数学)
- UVa 11609 Teams (组合数学)
- UVA 11174-组合数学+组合数取模+dfs
- 【UESTC】1423 - Run Step(打表 & 组合)
- UVa 10105 Polynomial Coefficients(组合数学)
- UVa 11076 Add Again (组合数学)
- UVa 10198 Counting (组合数学&高精度)
- UVa 10157 Expressions (组合数学&高精度)
- UVa 861 Little Bishops (组合数学)
- UVA 10375 Choose and divide(组合数学)
- UVa 10994 Simple Addition (组合数学)
- mac 电脑 eclipse 启动停在 org.eclipse.debug.core 导致无法启动
- Android Fragment 真正的完全解析(下)
- 7.9 Git 工具 - Rerere
- plsql的语句创建数据库及删除表空间及用户的语句
- 类的初始化块
- UVA 7360 run step(组合数学)
- ListView The content of the adapter has changed but ListView did not receive a notification.
- [T][5]NOIP 2012 国王游戏
- lavarel框架增删改查
- xcode快捷键
- Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
- 7.10 Git 工具 - 使用 Git 调试
- 块级元素和内联元素(行内元素)
- 观察者模式