采药-题解(C++代码) 摘要:```cpp #include #include using namespace std; int main() { int i,j,v; int T,M; int t[110]…… 题解列表 2019年11月28日 0 点赞 0 评论 504 浏览 评分:0.0
采药-题解(C语言代码) 摘要:```cpp #include using namespace std; int main() { int i,j,t; int T,M;//T为可采药时间M为药材总数 int …… 题解列表 2019年11月28日 0 点赞 0 评论 367 浏览 评分:0.0
采药-题解(C++代码) 摘要:```cpp #include #include #include #include #include using namespace std; const int MAXN=1e3…… 题解列表 2020年04月05日 0 点赞 0 评论 527 浏览 评分:0.0
采药-题解(C++代码) 摘要:## 典型背包问题 ### 1.当药草可以随便取的时候(题目中不是) 不需要考虑药草个数问题 dp[i]:代表i内时间取得的药草之和最大值; h[j].t:代表第j颗药草所花时间 v代表对应价…… 题解列表 2020年04月13日 0 点赞 0 评论 427 浏览 评分:0.0
采药-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#define max 10000int f[max][max]={0};int time[ma…… 题解列表 2020年10月01日 0 点赞 0 评论 316 浏览 评分:0.0
采药-题解(C语言代码) 摘要: ```c #include int main() { int t,m,i,j; int a[101][102]; int b[102][1002]; …… 题解列表 2020年11月17日 0 点赞 0 评论 273 浏览 评分:0.0
背包型动态规划 摘要:解题思路:注意事项:参考代码: public static void main(String[] args) { Scanner scanner=new Scanner(Sys…… 题解列表 2021年03月26日 0 点赞 0 评论 273 浏览 评分:0.0
最简单的解法了,用功认真理解,反复多做几次你也能掌握。 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>#include <stdlib.h>#define max(a,b) a>b?a:bint m…… 题解列表 2021年11月29日 0 点赞 0 评论 190 浏览 评分:0.0
1100: 采药(python代码) 摘要:解题思路:注意事项:参考代码:t,n=map(int,input().split()) ls=[[0,0]] for i in range(n): time,value=map(int,…… 题解列表 2022年02月13日 0 点赞 0 评论 527 浏览 评分:0.0
1100: 采药-动态规划 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long n,m,a[10000],b[10000],f[1005]; i…… 题解列表 2022年05月02日 0 点赞 0 评论 119 浏览 评分:0.0