Starting in the top left corner of a 22 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.

How many such routes are there through a 2020 grid?

题目大意:

从一个22网格的左上角开始,有6条(不允许往回走)通往右下角的路。

对于2020的网格,这样的路有多少条?

// (Problem 15)Lattice paths
// Completed on Tue, 11 Feb 2014, 23:58
// Language: VC++2010
//
// 版权所有(C)acutus (mail: acutus@126.com)
// 博客地址:http://www.cnblogs.com/acutus/
#include<iostream>
#include<cmath>
using namespace std; long long a[][]; int main()
{
int i;
for(i = ; i < ; i++)
{
a[][i] = ;
a[i][] = ;
}
for (i = ; i < ; i++)
for (int j = ; j < ; j++)
a[i][j] = a[i][j-] + a[i-][j];
cout<<a[][]<<endl;
return ;
}
Answer:
137846528820

最新文章

  1. map 和 vector 的erase函数说明
  2. (十三) [终篇] 一起学 Unix 环境高级编程 (APUE) 之 网络 IPC:套接字
  3. Mina、Netty、Twisted一起学(五):整合protobuf
  4. View相关知识学习总结
  5. 【2016-10-10】【坚持学习】【Day1】【观察者模式】
  6. Swift3.0语言教程使用编码创建和初始化字符串
  7. C# Process执行bat
  8. servlet&amp;jsp高级:第三部分
  9. jquery 判断是否 ie6 ie7 ie8
  10. 获取iOS设备属性
  11. python数据类型——数字类型
  12. Dynamics CRM项目实例之九:CRM 2015的产品中的捆绑销售
  13. 第四节,目标检测---YOLO系列
  14. 3Delight feats. OpenVDB
  15. centOS7docker安装oracle
  16. python学习笔记(10)--组合数据类型(序列类型)
  17. [转]MySQL事务学习--&gt;隔离级别
  18. 铁乐学python26_hashlib+configparser+logging模块
  19. 一般处理程序中,获取session
  20. Kernel Mode, User Mode

热门文章

  1. poj 1041 John&#39;s trip 欧拉回路
  2. IOS本地化。
  3. 2_Cat Years
  4. 开发板-PC机(宿主机)-虚拟机(VM)之间网络通信设置方法及须要注意的问题
  5. sql 时间和字符串 取到毫秒级
  6. ASP.NET 操作配置文件
  7. C#关键字列表
  8. list, tuple, dict, set的用法总结
  9. SpringMVC请求访问不到静态文件解决方式
  10. 深入浅出—JAVA(9)