leetcode题目 void backtrack(vector<vector<int>>& res, vector<int>& output, int first, int len){if (firstlen){res.push_back(output);}for (int i first; i < len; i) {std::swap(output[first],output[i]);backtrack(res,output,first1,…
可以走1台阶 2台阶 3台阶
long long MoveStairs(int total){if (total < 4) {return total 3 ? 4 : total;}int a 1, b 2, c 4;for (int i 4; i < total; i) {int temp (a b) % 1000000007 c;a b;b c;c temp % 1000000007;}return c;
}