摘要: 变形01背包 #include <bits/stdc++.h> using namespace std; const int N=1010; int s; int n,m; int v[N],w[N],f[N]; int accum(int p) { //预先处理约数之和 int ans=0; fo 阅读全文
posted @ 2024-05-27 20:29 LTphy 阅读(17) 评论(0) 推荐(0)
摘要: 前缀和走起 #include <bits/stdc++.h> using namespace std; #define int long long const int N=2e5+7; int n; int a[N]; int sum[N],ans; signed main(){ cin>>n; f 阅读全文
posted @ 2024-05-27 20:27 LTphy 阅读(57) 评论(0) 推荐(0)