随笔分类 -  数论/数学-FWT

摘要:题目链接 "BZOJ4036" 题解 好套路的题啊,,, 我们要求的,实际上是一个集合$n$个$1$中最晚出现的$1$的期望时间 显然$minmax$容斥 $$E(max\{S\}) = \sum\limits_{T \subseteq S} ( 1)^{|T| + 1}E(min\{T\})$$ 阅读全文
posted @ 2018-07-03 22:00 Mychael 阅读(756) 评论(3) 推荐(1)
摘要:题目链接 "hdu6057" 题意 给出序列$A[0...2^{m} 1]$和$B[0...2^{m} 1]$,求所有 $$C[k] = \sum\limits_{i \; and \; j = k} A[i \; xor \; j]B[i \; or \; j]$$ 题解 我只能感叹太神了 看到题 阅读全文
posted @ 2018-07-03 12:02 Mychael 阅读(144) 评论(0) 推荐(0)
摘要:题目链接 "CSU1911" 题解 FWT模板题 cpp include include include include include include include include include define LL long long int define REP(i,n) for (int 阅读全文
posted @ 2018-07-03 07:05 Mychael 阅读(203) 评论(0) 推荐(0)
摘要:题目链接 "CF662C" 题解 行比较少,容易想到将每一列的状态压缩 在行操作固定的情况下,容易发现每一列的操作就是翻转$0$和$1$,要取最小方案,方案唯一 所以我们只需求出每一种操作的答案 如果操作的行的集合为$S$,那么对于状态为$e$的列,将会变成$e \; xor \; S$,同时产生$ 阅读全文
posted @ 2018-07-02 21:04 Mychael 阅读(331) 评论(0) 推荐(0)
摘要:题目链接 "hdu5909" 题解 设$f[i][j]$表示以$i$为根的子树,$i$一定取,剩余节点必须联通,异或和为$j$的方案数 初始化$f[i][val[i]] = 1$ 枚举儿子$v$转移 $$f[i][j] = f[i][j] + \sum\limits_{x \; xor \; y = 阅读全文
posted @ 2018-07-02 20:12 Mychael 阅读(257) 评论(0) 推荐(0)
摘要:题目链接 "BZOJ4589" 题解 "FWT" 模板题 cpp include include include include include include include include include define LL long long int define REP(i,n) for ( 阅读全文
posted @ 2018-07-02 17:40 Mychael 阅读(138) 评论(0) 推荐(0)