3061: 公共子序列 摘要:解题思路:f[i][j] 表示a字符串前i字符与b字符串前j字符的最大公共子序列长度注意事项:参考代码:#include<iostream> #include<cstring> using nam…… 题解列表 2024年05月05日 0 点赞 0 评论 155 浏览 评分:9.9
3062: 计算字符串距离 摘要:解题思路:f[i][j]表示a字符串前i字符与b字符串前j字符最短距离注意事项:参考代码:#include<iostream> #include<cstring> using namespace …… 题解列表 2024年05月05日 0 点赞 0 评论 182 浏览 评分:9.9
3063: 糖果 DP动态规划 摘要:解题思路:f[i][j]表示i堆,余数为j 的糖果最大数量注意事项:初始化f最大负值参考代码:#include<iostream> #include<cstring> #include<algor…… 题解列表 2024年05月05日 0 点赞 0 评论 160 浏览 评分:9.9
3064: 鸡蛋的硬度 DP 摘要:解题思路:f[i][j]表示i层楼j个鸡蛋最小扔鸡蛋次数注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> us…… 题解列表 2024年05月05日 0 点赞 0 评论 171 浏览 评分:9.9
3067: 大盗阿福 DP 摘要:解题思路:f[i]表示前i店铺能获取的最大值, j表示不相邻的前j个店铺注意事项:内层循环倒序, 注意递推的顺序参考代码:#include<iostream> #include<cstring> …… 题解列表 2024年05月05日 0 点赞 0 评论 161 浏览 评分:9.9
3066: Maximum sum 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstring> #include<algorithm> using namespace std; co…… 题解列表 2024年05月05日 0 点赞 0 评论 157 浏览 评分:9.9
3065: 最长公共子上升序列 摘要:解题思路:后续补充注意事项:测试结果顺序可能不一致,交换a, b序列嵌套循环参考代码:#include#include#include #includeusing namespace std; …… 题解列表 2024年05月06日 0 点赞 0 评论 202 浏览 评分:9.9
挖 矿 摘要:解题思路:注意事项:参考代码:N = int(2e6 + 10)n, m = map(int, input().split())a = list(map(int, input().split()))l…… 题解列表 2024年05月06日 0 点赞 0 评论 569 浏览 评分:9.9
砍 柴 摘要:解题思路:注意事项:参考代码:import mathdef get_primes(max_val): v = [True] * (max_val + 1) for x in range(2, …… 题解列表 2024年05月06日 3 点赞 0 评论 1014 浏览 评分:9.9
题目 3241: 蓝桥杯2024年第十五届省赛真题-挖矿 摘要:# 二分题解 #### 食用之前请先来一发暴力更有利于理解题意 :D ## 1、为什么用二分? 由于不知道要访问多少个坐标,于是我们就来枚举有多少个,发现时间复杂度为 O(n^2),而这…… 题解列表 2024年05月08日 3 点赞 0 评论 766 浏览 评分:9.9