posted @ 2013-07-25 19:15 冰天雪域 阅读(139) 评论(0) 推荐(0) 编辑
摘要:
class Solution {public: int climbStairs(int n) { // Start typing your C/C++ solution below // DO NOT write int main() function if(n f(n+1, 0); f[1] = 1; f[2] = 2; for(int i = 3; i <= n; i++){ f[i] = f[i-1]+f[i-2]; } ... 阅读全文