#include<iostream> #include<algorithm> using namespace std; const int Mod = 1e9 + 7; typedef long long ll; ll f[1005] = {0, 1, 2}; int main(){ int n; ios::sync_with_stdio(false); cin >> n; for(int i = 3; i <= n; ++i) f[i] = (f[i - 1] + f[i - 2]) % Mod; cout << f[n] << endl; return 0; }
1031 骨牌覆盖
猜你喜欢
转载自blog.csdn.net/m0_37691414/article/details/80036845
今日推荐
周排行