超级楼梯 (C++代码) 摘要:解题思路:斐波拉契数列(简单的动态规划)注意事项:参考代码:#include <iostream>using namespace std;int main() { int cases, n, …… 题解列表 2018年01月01日 1 点赞 0 评论 1254 浏览 评分:0.0
超级楼梯 (C++代码)重温一下记忆搜索 摘要:#include<bits/stdc++.h> using namespace std; int a[50]={0,1,1,2}; int dp[50]; int f(int n) { …… 题解列表 2018年12月09日 0 点赞 1 评论 662 浏览 评分:0.0
超级楼梯 (C++代码)简单的DFS模版题 摘要:解题思路: 使用简单的深度优先算法解决问题。 1.由于不存在负数的楼梯,本着让数据量最大的原则,使用unsigned long long来做变量。 2.dfs----深度优先算法,将…… 题解列表 2019年01月17日 0 点赞 0 评论 945 浏览 评分:0.0
超级楼梯(递归的是神,迭代的是人) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include<cstdio>#include<cstring>#include<set>#include<string>#inc…… 题解列表 2022年02月09日 0 点赞 0 评论 222 浏览 评分:0.0
2种递归写法 摘要:解题思路: #include <bits/stdc++.h>using namespace std;int pd(int m){ if(m<=0) return 0; if(m==1) r…… 题解列表 2023年06月19日 1 点赞 0 评论 158 浏览 评分:0.0
1257: 超级楼梯(动态规划入门) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>using namespace std;int main(){ int T; cin >> T; w…… 题解列表 2024年07月13日 0 点赞 0 评论 132 浏览 评分:0.0
最暴力的写法QwQ 摘要:#include<bits/stdc++.h> using namespace std; void solve() { int m,cnt=0; cin>>m; for(int i=…… 题解列表 2024年08月09日 1 点赞 0 评论 147 浏览 评分:0.0
1257: 超级楼梯(斐波那契递归)动态规划 摘要:```cpp #include using namespace std; int main() { int n; cin >> n; int m; while (n--…… 题解列表 2024年10月05日 0 点赞 0 评论 175 浏览 评分:0.0
记忆化搜索 摘要:注意事项:(67分的痛谁懂),百思不得其解为啥从第1阶到第m(当m=1时)阶的走法竟然是1```cpp#includeusing namespace std;long dp[100…… 题解列表 2025年02月24日 0 点赞 0 评论 132 浏览 评分:0.0
超级楼梯(递推) 摘要:解题思路:递推注意事项:参考代码:#include<iostream>usingnamespacestd;constintN&nbs…… 题解列表 2025年04月10日 0 点赞 0 评论 97 浏览 评分:0.0