循环多少次(HDU 1799)
来源:互联网 发布:服务器数据库恢复 编辑:程序博客网 时间:2024/05/07 22:09
此题链接单击这里
=================
用扬辉三角
#include <iostream>using namespace std;long a[2010][2010];void funt(){ for(int i=1;i<=2001;i++) { a[i][1]=i%1007; a[i][i]=1; } for(int i=3;i<=2001;i++) for(int j=2;j<i;j++) a[i][j]=(a[i-1][j-1]+a[i-1][j])%1007;}int main(){ funt(); int T; cin>>T; while(T--) { int m,n; cin>>m>>n; cout<<a[n][m]<<endl; } return 0;}
有问题联系企鹅791267032
邮箱地址….wutanrong@Hotmail.com
0 0
- hdu 1799 循环多少次?
- HDU 1799 循环多少次?
- hdu 1799 循环多少次?
- HDU 1799 循环多少次?
- hdu 1799 循环多少次?
- hdu-1799-循环多少次?
- hdu-1799-循环多少次?
- hdu 1799 循环多少次?
- HDU 1799 循环多少次?
- hdu 1799 循环多少次?
- hdu 1799 循环多少次?
- 循环多少次(hdu 1799)
- HDU 1799 循环多少次?
- 循环多少次(HDU 1799)
- HDU 1799 循环多少次?
- hdu-1799 循环多少次?
- HDU 1799 循环多少次?
- HDU ACM 1799 循环多少次?
- Cocos2D游戏之旅(二):主角血条的实现
- c#初始化顺序
- HDU 1452 Happy 2004
- UITableView
- HDOJ5281 Senior's Gun(贪心思想)
- 循环多少次(HDU 1799)
- shell小技巧--用“$$”和"$0"防止同一个脚本启动多次
- 【NOIP2014】飞扬的小鸟题解
- extern static
- Adaptive Thresholding Using the Integral Image ( Derek Bradley* Gerhard Roth)
- SSH学习九 依赖注入及加载Spring配置文件的方法
- netty开发教程(一)
- cocos2d-x学习日记 - 3. 坐标系
- Rip Van Winkle's Code