信息学奥赛一本通T1267-01背包问题 摘要:解题思路:f[j] j背包重量得到的最大价值注意事项:当j 大于等于第i物品的重量时,更新f[j]参考代码:#include<iostream> #include<algorithm> using…… 题解列表 2024年04月18日 0 点赞 0 评论 206 浏览 评分:9.9
回文数组(贪心) 摘要:解题思路:贪心,优先操作相邻的两个数注意事项:数据需要开long long,否则只能只能过部分数据参考代码:#include#include#includeusing namespace std;ty…… 题解列表 2024年04月18日 1 点赞 0 评论 637 浏览 评分:9.9
: 三角形最佳路径问题 摘要:解题思路:三角形最佳路径经典DP, f[i][j]表示到达i行j列的最佳路径注意事项:参考代码:#include<iostream> #include<algorithm> using names…… 题解列表 2024年04月18日 0 点赞 0 评论 321 浏览 评分:9.9
蓝桥杯2024年第十五届省赛真题-训练士兵 摘要:解题思路:按照训练次数从小到大排序, 从训练次数少的开始枚举,贪心找单独训练还是组团训练注意事项:参考代码:#include <bits/stdc++.h> #define int long lon…… 题解列表 2024年04月18日 16 点赞 0 评论 3440 浏览 评分:8.4
3054: 最低通行费 摘要:解题思路:DP注意事项:初始化第一行第一列数据参考代码:#include<iostream> #include<algorithm> using namespace std; const int…… 题解列表 2024年04月18日 0 点赞 0 评论 243 浏览 评分:9.9
基础的递归拆分输出 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;#define endl '\n'#define int long…… 题解列表 2024年04月18日 0 点赞 0 评论 257 浏览 评分:0.0
3053: 怪盗基德的滑翔翼 摘要:解题思路:转化最长上升子序列和最长下降子序列的最大值注意事项:参考代码:#include<iostream> #include<algorithm> #include<cstring> cons…… 题解列表 2024年04月18日 0 点赞 0 评论 233 浏览 评分:9.9
基础的递归组合输出 摘要:解题思路:1~n选择的排列数量r,递归可以用两个变量一个用于控制走,一个控制数量注意事项:采用的是框架写的:#include <bits/stdc++.h>using namespace std;#d…… 题解列表 2024年04月18日 0 点赞 0 评论 449 浏览 评分:0.0
3052: 最大上升子序列和 摘要:解题思路:经典DP, f[i] 以i节点为结尾的最大上升子序列和注意事项:参考代码:#include<iostream> #include<algorithm> const int N = 1e3…… 题解列表 2024年04月18日 0 点赞 0 评论 195 浏览 评分:9.9
2983: 花生采摘 摘要:解题思路:贪心策略,按照题目要求从最多的花生开始采摘注意事项:数据与题意不符, 有部分重复数据,因此有三组数据未通过,以hack方式解决, 希冀后来的同学能够找到完美的解决方式参考代码:#includ…… 题解列表 2024年04月18日 0 点赞 0 评论 206 浏览 评分:9.9