摘要:
有两种做法 第一种定义cnt[j]为体积恰好为j的所有方案数 第二种定义cnt[j]为体积不超过j的所有方案数 定义不同,初始状态(边界)不同,计算答案的方式也不同 #恰好的写法 //不超过的写法 #include<bits/stdc++.h> using namespace std; #defin 阅读全文
posted @ 2022-06-28 16:56
xhy666
阅读(30)
评论(0)
推荐(0)
摘要:
树形dp + 分组背包 #include<bits/stdc++.h> using namespace std; #define fr first #define se second typedef pair<int, int> PII; typedef long long LL; typedef 阅读全文
posted @ 2022-06-28 15:56
xhy666
阅读(26)
评论(0)
推荐(0)