摘要: http://oj.leetcode.com/submissions/detail/1508385/最最简单的dp 1 class Solution { 2 public: 3 int flag[1000001] = {0}; 4 int f(int n) { 5 if (flag[n] != 0) return flag[n]; 6 if (1 == n) { 7 return 1; 8 } else if (2 == n) { 9 return 2;10 } el... 阅读全文
posted @ 2013-11-21 13:13 NextLife 阅读(229) 评论(0) 推荐(0)