07 2021 档案

摘要:和原板子区别不大,更符合我的代码习惯 #include<cstdio> #include<algorithm> #include<cstring> #include<queue> using namespace std; const int maxn = 2e5+5; int n, m, head[ 阅读全文
posted @ 2021-07-21 08:10 Mint-hexagram 阅读(50) 评论(0) 推荐(0)
摘要:#include<cstdio> #include<algorithm> #include<cstring> #include<queue> using namespace std; const int maxn = 2e5+5; struct mint { int nxt, v, w; }e[ma 阅读全文
posted @ 2021-07-20 15:52 Mint-hexagram 阅读(66) 评论(0) 推荐(0)
摘要:二进制优化用于多重背包中。 (1)多重背包模板: long long dp[maxn], n, W, v[maxn], w[maxn], m[maxn]; //n是物品种类,W是背包总容量,v[i]是第i种物品的价值,w[i]是第i种物品的重量,m[i]是第i种物品的件数 for(int i = 1 阅读全文
posted @ 2021-07-19 15:46 Mint-hexagram 阅读(103) 评论(0) 推荐(0)