![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构和算法
好运来-
这个作者很懒,什么都没留下…
展开
-
纯快排代码
#include<bits/stdc++.h>using namespace std;int n;int a[10006];int sort(int low ,int high){ a[0] = a[low]; int tag=a[low]; while(low<high) { while(low < high && a[high] >= tag) high--; a[low] = a[high]; while(low < h原创 2021-03-08 22:29:14 · 102 阅读 · 0 评论 -
背包问题--存代码
//背包问题极简版#include<bits/stdc++.h>using namespace std;int w[5000];int v[5000];int dp[10000];int main(){ int n,m; cin >> n >> m; for(int i=1;i<=n;i++) cin >> w[i] >> v[i]; for(int i=1;i<=n;i++) { for(int j=m原创 2021-03-08 22:01:06 · 62 阅读 · 0 评论