摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4036 min-max容斥:https://blog.csdn.net/ez_2016gdgzoi471/article/details/81416333 二项式反演:https://blog. 阅读全文
posted @ 2019-01-12 16:19 Zinn 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 题目:http://codeforces.com/contest/914/problem/G 其实就是把各种都用子集卷积和FWT卷起来算即可; 注意乘 Fibonacci 数组的位置; 子集卷积时不能一边做一边更新卷积的数组! 代码如下: 阅读全文
posted @ 2019-01-12 12:02 Zinn 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 题目:http://uoj.ac/problem/348 一开始可以 3^n 子集DP,枚举一种状态的最后一个集合是什么来转移; 设 \( f[s] \) 表示 \( s \) 集合内的点都划分好了,\( g[s] = \sum\limits_{i \in s} w[i] \) 那么 \( f[s] 阅读全文
posted @ 2019-01-12 10:05 Zinn 阅读(281) 评论(0) 推荐(0) 编辑