编写题解 1103: 开心的金明 摘要:解题思路:动态规划,背包问题注意事项:参考代码:N, m = map(int, input().split())sub_value = []sub_importance = []for _ in ra…… 题解列表 2024年02月19日 0 点赞 0 评论 285 浏览 评分:0.0
动态规划入门:深搜(递归)→记忆化搜索→递推(DP) 摘要:解题思路:对于每家店,有选和不选两种选择那选还是不选取决于我当前是否能取得最大价值第一步:画搜索树第二步:暴力DFS关键:找到递归边界值和递归公式递归公式:dfs(n)=max(dfs(n+1),df…… 题解列表 2024年02月19日 1 点赞 0 评论 409 浏览 评分:9.9
algorithm头文件函数:sort() 摘要:解题思路:不认识algorithm头文件函数的可以看这篇文章:https://blog.csdn.net/weixin_43899069/article/details/104450000注意事项:参…… 题解列表 2024年02月19日 0 点赞 0 评论 277 浏览 评分:9.9
蓝桥杯2018年第九届真题-倍数问题(滚动数组) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<cstring>#include<cmath>#include<vector>…… 题解列表 2024年02月19日 0 点赞 0 评论 329 浏览 评分:9.9
计算机二级-公约公倍 摘要:解题思路:公约数就是两个数之间最大的因数,公倍数就是两个数都可以整除的最小的数。注意事项:求最大公约数我运用了辗转相除法,所以用while循环会好一些,最后的被除数就是公约数,最小公倍数运用了公式。参…… 题解列表 2024年02月19日 0 点赞 0 评论 256 浏览 评分:9.9
判断唯一字符-易懂最佳方案 摘要:解题思路:判断字符串是否存在唯一字符 比如 aba ,那么字符'a'最先出现坐标: 0 (str.indexOf("a"))最后出现坐标:2 (str.lastIndexOf…… 题解列表 2024年02月19日 1 点赞 1 评论 388 浏览 评分:9.9
A+B for Input-Output Practice (V) 摘要:#include<iostream>#include<vector>#include<algorithm>using namespace std;int main() { int a, b, c…… 题解列表 2024年02月19日 0 点赞 0 评论 178 浏览 评分:0.0
幂的末尾-BigInteger 摘要:import java.util.Scanner;import java.math.BigInteger;public class Main { public static void main(…… 题解列表 2024年02月19日 0 点赞 0 评论 421 浏览 评分:9.9
买笔 C语言解 摘要:解题思路:注意事项:不能够有剩余的钱,且所买笔的数量尽量多参考代码:#include <stdio.h>int main(){ int a; int c,b; scanf( "%d"…… 题解列表 2024年02月19日 0 点赞 0 评论 303 浏览 评分:9.9
高精度阶乘计算 摘要:解题思路:python里可以用math库里的factorial方法,就是高精度的参考代码:from math import factorialprint(factorial(int(input()))…… 题解列表 2024年02月20日 0 点赞 0 评论 253 浏览 评分:9.9