1282: 公交汽车 dfs vs dp 摘要:### 这题比较简单,我采用了两种常见的方法来解答: ## 1:dfs(深度优先这题不可取,因为会时间超限87%) `其实这题用dfs的思想十分好理解——最优解型模板(参考[我的博客](https…… 题解列表 2022年07月04日 0 点赞 0 评论 301 浏览 评分:0.0
题解 1282: 公交汽车 摘要:参考代码:#include <stdio.h>#include <stdlib.h>int minest(int a,int b){ return a<b?a:b;}int main(){ …… 题解列表 2021年05月23日 0 点赞 0 评论 297 浏览 评分:0.0
编写题解 1282: 公交汽车 摘要:```java import java.util.Scanner; public class 公交汽车 { //10 10 30 5 5 60 70 80 90 100 // 17 pub…… 题解列表 2021年03月19日 0 点赞 0 评论 347 浏览 评分:0.0
1282: 公交汽车 动态规划 摘要: import java.util.Scanner; public class test { public static void main(String…… 题解列表 2021年08月27日 0 点赞 0 评论 381 浏览 评分:0.0
完全背包思想 画图就明白 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class a8 { /** * @param args */ public static void ma…… 题解列表 2021年03月18日 0 点赞 0 评论 318 浏览 评分:0.0
不算题解的题解 摘要: Scanner scanner=new Scanner(System.in); int[]arr=new int[10+1]; for (int i = 1; i < arr.leng…… 题解列表 2021年03月18日 0 点赞 0 评论 339 浏览 评分:0.0
蓝桥杯算法提高VIP-排列式-题解(Java代码)利用全排列法 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class test1282 { public static void main(St…… 题解列表 2021年03月17日 0 点赞 0 评论 287 浏览 评分:0.0
萌新:一个简单的完全背包问题 摘要:解题思路:注意事项:完全背包问题的状态转移方差:s[j]=max(s[j-w]+v,s[j])具体的max()函数的定义不能一概而论,要具体问题,具体思考参考代码:#include <iostream…… 题解列表 2021年09月21日 0 点赞 0 评论 203 浏览 评分:0.0
公交汽车动态规划c++ 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>…… 题解列表 2022年03月06日 0 点赞 0 评论 430 浏览 评分:0.0
记忆化搜索 摘要:解题思路:自顶而下搜索最小值注意事项:记录答案防止时间爆炸参考代码:#include<bits/stdc++.h>#define endl '\n'using namespace st…… 题解列表 2023年02月06日 0 点赞 0 评论 129 浏览 评分:0.0