摘要: "CF341D Iahub and Xors" 给定一个 $n\times n$ 的矩阵,平面异或,求平面异或和 $(n\leq10^3,\ m\leq10^5)$ 树状数组 这里主要是记录一下板子……qaq 时间复杂度 $O(m\log^2n)$ 代码 cpp include using name 阅读全文
posted @ 2019-02-01 12:41 cnJuanzhang 阅读(220) 评论(0) 推荐(0) 编辑
摘要: "CF617E XOR and Favorite Number" 已知一个序列 $a_1,\ a_2,\ \cdots,\ a_n$ 和 $k$ ,$m$ 次询问给出 $l,\ r$ ,求 $\displaystyle\sum_{i=l}^r\sum_{j=i}^r[a_x\oplus a_{x+1 阅读全文
posted @ 2019-02-01 12:14 cnJuanzhang 阅读(247) 评论(0) 推荐(0) 编辑
摘要: "CF980E The Number Games" 给定一棵大小为 $n$ 的树,第 $i$ 个点的点权为 $2^i$ ,删掉 $k$ 个点及其连边,使得剩下的点组成一个连通块,且权值和最大,输出要删掉的点 $n,\ k\leq10^6$ 贪心,倍增,dfs序 很容易想到一个贪心:不断删掉能被删除且 阅读全文
posted @ 2019-02-01 01:07 cnJuanzhang 阅读(224) 评论(0) 推荐(0) 编辑