金陵十三钗(超简单DFS+剪枝) 摘要:解题思路:记录一个最大值,如果当前搜索过程中的最大值 + 剩下层数 * maxv <= res 则不可能更新最大值 , 直接return 故只需要加一句剪枝代码: if (s + (n…… 题解列表 2022年03月01日 0 点赞 0 评论 621 浏览 评分:9.9
蓝桥杯算法训练VIP-数的统计 摘要:#include<iostream>#include<algorithm>using namespace std;const int N=1005;int arr1[N];int arr2[N];in…… 题解列表 2022年03月01日 0 点赞 0 评论 305 浏览 评分:0.0
动态规划-最长上升子序列模型,注意前一次和后一次的美味度可相等! 摘要:#include<iostream>using namespace std;const int N=1005;int a[N],dp[N];int main(){ int n; cin>>…… 题解列表 2022年03月01日 0 点赞 0 评论 387 浏览 评分:0.0
[STL训练]Who's in the Middle 摘要:```cpp #include using namespace std; #include #include bool cmp(int a,int b){ return a < b;…… 题解列表 2022年03月01日 0 点赞 0 评论 498 浏览 评分:0.0
1458: 蓝桥杯2013年第四届真题-错误票据 摘要: #include #include #include #include using namespace std; const int …… 题解列表 2022年03月01日 0 点赞 0 评论 318 浏览 评分:0.0
蓝桥杯算法提高VIP-学霸的迷宫 摘要:解题思路:跟着BFS的模板走就可以了,唯一要注意的是要用输出字典序,把方向的数组dir按照的一定的顺序排列即可注意事项:参考代码:#include<bits/stdc++.h> using name…… 题解列表 2022年03月01日 0 点赞 0 评论 979 浏览 评分:9.9
Hifipsysta-1924: 蓝桥杯算法提高VIP-01背包 摘要:```cpp #include using namespace std; int weight[5001]; int value[5001]; int dp[5001]; int…… 题解列表 2022年03月01日 0 点赞 0 评论 480 浏览 评分:0.0
Hifipsysta-2132: 信息学奥赛一本通T1268-完全背包问题 摘要:```cpp #include #include using namespace std; int weight[201]; int value[201]; int dp[201]…… 题解列表 2022年03月01日 0 点赞 0 评论 450 浏览 评分:0.0
左孩子右兄弟-dp(简单易懂) 摘要:解题思路:根据树的特性,应从下到上计算最大高度。对于每个父节点,它的最大高度应为其子节点的最大高度加上子节点的总数。不断往上推,即可得到根的最大高度即答案。注意事项:已被标记过的节点就不用重新计算了,…… 题解列表 2022年02月28日 0 点赞 1 评论 1273 浏览 评分:9.9
回文数(一) 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int fan(int ch){ //反转 把数反转…… 题解列表 2022年02月28日 0 点赞 1 评论 334 浏览 评分:0.0