题解列表
: 三角形最佳路径问题
摘要:解题思路:三角形最佳路径经典DP, f[i][j]表示到达i行j列的最佳路径注意事项:参考代码:#include<iostream>
#include<algorithm>
using names……
蓝桥杯2024年第十五届省赛真题-训练士兵
摘要:解题思路:按照训练次数从小到大排序, 从训练次数少的开始枚举,贪心找单独训练还是组团训练注意事项:参考代码:#include <bits/stdc++.h>
#define int long lon……
3054: 最低通行费
摘要:解题思路:DP注意事项:初始化第一行第一列数据参考代码:#include<iostream>
#include<algorithm>
using namespace std;
const int……
3053: 怪盗基德的滑翔翼
摘要:解题思路:转化最长上升子序列和最长下降子序列的最大值注意事项:参考代码:#include<iostream>
#include<algorithm>
#include<cstring>
cons……
3052: 最大上升子序列和
摘要:解题思路:经典DP, f[i] 以i节点为结尾的最大上升子序列和注意事项:参考代码:#include<iostream>
#include<algorithm>
const int N = 1e3……
2983: 花生采摘
摘要:解题思路:贪心策略,按照题目要求从最多的花生开始采摘注意事项:数据与题意不符, 有部分重复数据,因此有三组数据未通过,以hack方式解决, 希冀后来的同学能够找到完美的解决方式参考代码:#includ……
蓝桥杯2024年第十五届省赛真题-宝石组合
摘要:```cpp
#include
#include
#include
#include
#include
#include
using namespace std;
in……