leetcode 70: Climbing Stairs
2015-08-03 20:25
363 查看
class Solution { public: int climbStairs(int n) { vector<int> dp(n+1,1); for(int i=2;i<=n;i++) { dp[i]=dp[i-1]+dp[i-2]; } return dp ; } };
相关文章推荐
- POJ1273 Drainage Ditches (最大流+入门题)
- HDU 1532 Drainage Ditches(最大流)
- 服务器中很多的CLOSE_WAIT
- Traffic jam caused by the rain (3rd Aug.2015)
- 【HDOJ 1532】 Drainage Ditches(最大流模板)
- selection does not contain a main type
- JetBrains全系列注册机
- 2015 Multi-University Training Contest 4
- Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
- J - Air Raid - hdu 1151(最小边覆盖)
- 2015 Multi-University Training Contest 4 hdu 5338 ZZX and Permutations
- 论文提要“Pedestrian Detection aided by Deep Learning Semantic Tasks”
- URAL 1900. Brainwashing Device(dp+输出路径)
- LeetCode #217 Contains Duplicate
- BUPT Summer Training #7 for Grade 14 题解
- hdu 1532 Drainage Ditches(最大流ek+dinic)
- [LeetCode]#11 Container With Most Water
- 解决服务器存在大量time_wait的问题
- 杭电(hdu)1702 ACboy needs your help again!
- POJ 3250 Bad Hair Day(单调栈)