本质是最长上升子序列和最长下降子序列算法 摘要: li = list(map(int,input().split())) n = len(li) dp1 = [1]*n#最长不上升序列,dp1[i]==x代表以…… 题解列表 2022年03月14日 0 点赞 0 评论 712 浏览 评分:9.9
短作业优先-答疑 摘要:```cpp #include using namespace std; typedef long long ll; const int N=1e3+5; int n; struct no…… 题解列表 2022年03月14日 0 点赞 0 评论 702 浏览 评分:9.9
信息学奥赛一本通T1320-均分纸牌 摘要:```cpp #include using namespace std; typedef long long ll; const int N=100+5; int n; int a[N];…… 题解列表 2022年03月14日 0 点赞 0 评论 676 浏览 评分:9.9
优质题解 1227: 日期排序(qsort结构体三级排序) 摘要:解题思路:因为使用的是c语言,所以使用的是qsort排序,c++里也有sort排序,他们都提供了自定义排序的方法。qsort排序详解见https://blog.dotcpp.com/a/82350,不…… 题解列表 2022年03月14日 0 点赞 0 评论 1623 浏览 评分:9.9
防御导弹 序列型动态规划,最长下降子序列,方法都会,注意细节 摘要: ```cpp #include #include #include using namespace std; int n; int dp[1005]; int a[1005]; i…… 题解列表 2022年03月14日 0 点赞 0 评论 693 浏览 评分:9.9
优质题解 1207: 字符排列问题 C++ STL容器 深度优先搜索DFS 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; map<char,int>m; //对排列中的字符进行查重 …… 题解列表 2022年03月14日 0 点赞 0 评论 822 浏览 评分:9.9
题解 1924: 蓝桥杯算法提高VIP-01背包 摘要:解题思路: dp[i][j]表示面对第 i 个物品时,最大重量 j 的背包所拥有的最大价值打表,找出状态转移方程:if(j<w[i]){ //不拿 dp[i][j]=dp[i-1][j]; …… 题解列表 2022年03月14日 0 点赞 0 评论 910 浏览 评分:9.9
清晰明了简洁版代码 摘要:解题思路:注意事项:参考代码:n = int(input())s = ''for i in range(n): a = s s += chr(ord('A'…… 题解列表 2022年03月14日 0 点赞 0 评论 420 浏览 评分:9.9
[STL训练]A+B Python------十二 摘要:解题思路:用while循环,可不受组数限制。注意事项:引用try......except......进行取数,不受组数限制(防止测试时组数与题干数不同)参考代码:while True: tr…… 题解列表 2022年03月14日 0 点赞 0 评论 588 浏览 评分:9.9
双指针o(n)!! 摘要:```cpp #include using namespace std; int main(){ string s1; getline(cin, s1); int max_…… 题解列表 2022年03月14日 0 点赞 0 评论 609 浏览 评分:9.9