0/1背包问题,一维数组求解 摘要:/* 背包问题基本01: 递推公式: w[i]: 商品占用价值; val[i]: 商品价值; f[v] = max(f[v],f[v-w[i]]+val[i]) */ ``` #i…… 题解列表 2022年05月03日 0 点赞 0 评论 564 浏览 评分:9.9
编写题解 1027: [编程入门]自定义函数处理最大公约数与最小公倍数(递归法) 摘要:解题思路:注意事项:参考代码:m,n=map(int,input().split())def maxgongyue(m,n): if n != 0 : return maxgong…… 题解列表 2022年05月03日 0 点赞 0 评论 417 浏览 评分:0.0
数据结构-折半插入排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[100005],n;int main(){ cin>>n; for…… 题解列表 2022年05月03日 0 点赞 0 评论 404 浏览 评分:0.0
数据结构-直接插入排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[100005],n;int main(){ cin>>n; for…… 题解列表 2022年05月03日 0 点赞 0 评论 530 浏览 评分:0.0
绝对值排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std; bool cmp(int a, int b);int main(){ int…… 题解列表 2022年05月03日 0 点赞 0 评论 307 浏览 评分:0.0
C语言训练-排序问题<2> 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[15];int main(){ for(int i=0;i<10;i++…… 题解列表 2022年05月03日 0 点赞 0 评论 334 浏览 评分:0.0
C语言训练-排序问题<1> 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[15];int main(){ for(int i=0;i<4;i++)…… 题解列表 2022年05月03日 0 点赞 0 评论 291 浏览 评分:0.0
[编程入门]三个数字的排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[15];int main(){ for(int i=0;i<3;i++)…… 题解列表 2022年05月03日 0 点赞 0 评论 315 浏览 评分:0.0
快速排序练习 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[100005],n;int main(){ cin>>n; for…… 题解列表 2022年05月03日 0 点赞 0 评论 475 浏览 评分:0.0
蓝桥杯算法提高VIP-队列操作 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;queue<int>q;int n,a,b;int main(){ cin>>…… 题解列表 2022年05月03日 0 点赞 0 评论 408 浏览 评分:0.0