公交汽车-题解(C++代码)解法简单易懂 摘要:这题的思路和零钱兑换差不多,直接动态规划 ```cpp #include using namespace std; int fee[11],n,dp[60000];//随便开一个足够大的数组就…… 题解列表 2021年01月30日 0 点赞 0 评论 724 浏览 评分:6.0
公交汽车-题解(C语言代码) 摘要:```c #include const int INF = 0x3f3f3f3f; int min(int a,int b) { if(a…… 题解列表 2020年01月05日 0 点赞 0 评论 940 浏览 评分:4.7
记忆化搜索 摘要:解题思路:自顶而下搜索最小值注意事项:记录答案防止时间爆炸参考代码:#include<bits/stdc++.h>#define endl '\n'using namespace st…… 题解列表 2023年02月06日 0 点赞 0 评论 129 浏览 评分:0.0
公交汽车(完全背包) 摘要:解题思路:完全背包注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;constint&nbs…… 题解列表 2025年07月30日 0 点赞 0 评论 23 浏览 评分:0.0
1282: 公交汽车 dp和dfs 还是dfs更好用 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int a[11],n,kkk[110]; void dfs(int x,…… 题解列表 2024年12月14日 0 点赞 0 评论 215 浏览 评分:0.0
编写题解 1282: 公交汽车 摘要:解题思路:注意事项:参考代码:l = list(map(int,input().strip().split()))n = int(input())dp = [0 for i in range(n)]d…… 题解列表 2024年10月23日 0 点赞 0 评论 179 浏览 评分:0.0
1282: 公交汽车(动态规划) 摘要:核心:动态规划,dp数组代码:cost = [int(x) for x in input().split()] n = int(input()) dp = [0] * n # dp[i]物品(站…… 题解列表 2024年08月22日 0 点赞 0 评论 239 浏览 评分:0.0
无脑递推dp公交汽车 摘要:解题思路:无脑递推注意事项:参考代码:#include <stdio.h>int a[101];int main() { for (int i = 1; i <= 10;i++) { scanf("…… 题解列表 2023年03月26日 0 点赞 0 评论 192 浏览 评分: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
蓝桥杯算法提高VIP-排列式-题解(Java代码)利用全排列法 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class test1282 { public static void main(St…… 题解列表 2021年03月17日 0 点赞 0 评论 287 浏览 评分:0.0