剑指offer10 矩形覆盖
来源:互联网 发布:vip视频盒子app源码 编辑:程序博客网 时间:2024/05/16 10:30
列举了前5个的数值
1 2 3 4 5
1 2 3 4 8
然后推断其为斐波那契,果断AC
#include "iostream"#include "stdio.h"using namespace std;class Solution {public: int rectCover(int number) { if(number == 0) return 1; num[1] = 1; num[2] = 2; for(int i=3;i<48;i++) { num[i] = num[i-1] + num[i-2]; } return num[number]; }public:int num[100];};int main(){Solution test;int result;result = test.rectCover(47);cout<<result<<endl;return 0;}
0 0
- 剑指offer10 矩形覆盖
- 【面试题】剑指offer10
- 剑指offer--矩形覆盖
- 剑指offer--矩形覆盖
- 《剑指offer》矩形覆盖
- 剑指offer 矩形覆盖
- 《剑指offer》矩形覆盖
- 剑指 offer:矩形覆盖
- 【剑指Offer】矩形覆盖
- 剑指offer 矩形覆盖
- 剑指offer-矩形覆盖
- 剑指Offer 矩形覆盖
- 剑指offer 矩形覆盖
- [剑指offer]矩形覆盖
- 《剑指offer》-矩形覆盖
- 【剑指offer】覆盖矩形
- 《剑指offer》矩形覆盖
- 剑指offer - 矩形覆盖
- openjudge 马走日
- 加密与解密(破解总思想与基本手段)
- IAR出现Copy protection check, No valid license found for this product的解决办法
- iOS 第三方库冲突的处理
- VB/VC/易语言/Delphi 破解常见思路
- 剑指offer10 矩形覆盖
- mongodb3.0.6的下载和安装
- 加密与解密(修改关键数据实现中端破解)
- leetcode Binary Tree Paths
- 加密与解密(针对VB程序特性的破解)
- BZOJ2339: [HNOI2011]卡农
- 加密与解密(逆向过程中的Delphi特色)
- 简单演示BLOCK的基本使用方法
- eclipse中导入opencv