HDU 2046 骨牌铺方格

题目:http://acm.hdu.edu.cn/showproblem.php?pid=2046

递推题

#include <iostream>

using namespace std;

int main()
{
    int n;
    __int64 dp[51]={0,1,2,3};
    for(int i=4;i<51;i++)
    {
        dp[i] = dp[i-1] + dp[i-2];
    }
    while(cin>>n)
    {
        cout<<dp[n]<<endl;
    }
    return 0;
}
原文地址:https://www.cnblogs.com/destino74/p/3332015.html