链接:https://leetcode-cn.com/problems/qing-wa-tiao-tai-jie-wen-ti-lcof/
代码:
class Solution { public: int numWays(int n) { std::vector<int> vec = {1, 1}; for(int i = 2; i <= n; i++){ vec.push_back((vec[i-2] + vec[i-1])%1000000007); } return vec[n]; } };