最长不下降子序列的长度(动态dp——寻找前一项的最优解) 摘要:解题思路:利用动态规划,确定出到每一个数字的时候,所对应的dp[i]为多少dp[i]表示为在第i个数字时,前i个数字能组成的最长不下降子序列的长度例如给出一个数列: 1 3 5 2 8 7dp[4]=…… 题解列表 2024年03月07日 0 点赞 0 评论 321 浏览 评分:9.9
P1049-题解(C++代码,这不是我写的,我写的更麻烦,你们可以参考一下) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int a[1001],n; int b…… 题解列表 2020年08月17日 0 点赞 0 评论 644 浏览 评分:9.9
P1049 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<ct…… 题解列表 2018年02月23日 0 点赞 0 评论 881 浏览 评分:6.0
1316: 最长不下降子序列的长度 摘要:```cpp #include using namespace std; int main() { int n,t,max=-1,a[5001],b[5001]; scan…… 题解列表 2023年05月03日 0 点赞 0 评论 202 浏览 评分:6.0