题解 1282: 公交汽车

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

1282: 公交汽车 dfs vs dp

摘要:### 这题比较简单,我采用了两种常见的方法来解答: ## 1:dfs(深度优先这题不可取,因为会时间超限87%) `其实这题用dfs的思想十分好理解——最优解型模板(参考[我的博客](https……

不算题解的题解

摘要: Scanner scanner=new Scanner(System.in); int[]arr=new int[10+1]; for (int i = 1; i < arr.leng……

公交汽车动态规划c++

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>……

完全背包思想 画图就明白

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class a8 { /** * @param args */ public static void ma……

萌新:一个简单的完全背包问题

摘要:解题思路:注意事项:完全背包问题的状态转移方差:s[j]=max(s[j-w]+v,s[j])具体的max()函数的定义不能一概而论,要具体问题,具体思考参考代码:#include <iostream……