HDU - 2046 骨牌铺方格
来源:互联网 发布:网络调研报告论文 编辑:程序博客网 时间:2024/05/12 07:42
HDU - 2046
骨牌铺方格
Description
在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数.
例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图:
例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图:
Input
输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0<n<=50)。
Output
对于每个测试实例,请输出铺放方案的总数,每个实例的输出占一行。
Sample Input
132
Sample Output
132
Source
递推求解专题练习(For Beginner)
#include <iostream>using namespace std;int main(){ __int64 str[60];//注意为爆炸性增长 str[1] = 1; str[2] = 2; for(int i = 3; i < 60; i ++) { str[i] = str[i-1] + str[i-2]; } int n; while(cin >> n) { printf("%I64d\n", str[n]); }}
0 0
- hdu 2046骨牌铺方格
- hdu 2046骨牌铺方格
- HDU--2046骨牌铺方格
- HDU 2046 骨牌铺方格
- hdu 2046 骨牌铺方格
- HDU-2046骨牌铺方格
- HDU 2046 骨牌铺方格
- HDU 2046 - 骨牌铺方格
- HDU 2046骨牌铺方格
- HDU 2046 骨牌铺方格。
- HDU 2046 骨牌铺方格
- [hdu-2046] 骨牌铺方格
- HDU 2046 骨牌铺方格
- HDU 2046 骨牌铺方格
- HDU 2046 骨牌铺方格
- hdu 2046 骨牌铺方格
- hdu-2046-骨牌铺方格
- HDU 2046 骨牌铺方格
- 黑马程序员JAVA 030---040 小结
- atitit.商业版 源码保护 与 java本地原生代码转换 的方案总结
- android handler线程原理详解
- 初识Java
- 文章标题
- HDU - 2046 骨牌铺方格
- 【LeetCode】Construct Binary Tree from Preorder and Inorder Traversal 根据先序序列和中序序列恢复二叉树
- Centos6.4下安装mysql数据库
- CodeForces - 523C Name Quest
- 【SICP练习】133 练习3.64
- ARC 和 非ARC 之间的转换方法
- 【LeetCode】Convert Sorted List to Binary Search Tree
- 杭电 HDU 1163 Eddy's digital Roots
- CodeForces - 515A Drazil and Date