标签:des style blog io os for 数据 2014 div
1 2
#include <iostream> #include <cstring> #include <cstdio> #include <cmath> #include <set> #include <stack> #include <cctype> #include <algorithm> #define lson o<<1, l, m #define rson o<<1|1, m+1, r using namespace std; typedef long long LL; const int maxn = 500050; const int mod = 99999997; const int MAX = 0x3f3f3f3f; int t, a, b; LL f[100]; int main() { f[1] = 3; f[2] = 6; f[3] = 6; for(int i = 4; i <= 50; i++) f[i] = f[i-1] + 2*f[i-2]; while(~scanf("%d", &b)) { printf("%I64d\n", f[b]); } return 0; }
HDU 2045 不容易系列之(3)—— LELE的RPG难题
标签:des style blog io os for 数据 2014 div
原文地址:http://blog.csdn.net/u013923947/article/details/39483691