2019年2月26日

LOJ 2312(洛谷 3733) 「HAOI2017」八纵八横——线段树分治+线性基+bitset

摘要: 题目:https://loj.ac/problem/2312 https://www.luogu.org/problemnew/show/P3733 原本以为要线段树分治+LCT,查了查发现环上的值直接是 dis[ u ] ^ dis[ v ] ^ w[ i ] 就行了(其中 u , v 是边的两端 阅读全文

posted @ 2019-02-26 15:43 Narh 阅读(247) 评论(0) 推荐(0) 编辑

bzoj 4184 shallot——线段树分治+线性基

摘要: 题目:https://www.lydsy.com/JudgeOnline/problem.php?id=4184 本来想了可持久化trie,不过空间是 nlogn (出一个节点的时候把 tot 复原就能做到),时间是 nlog2n 的,不太可过。 查了查发现就是线性基。因为新增一些数的话,线性基只会 阅读全文

posted @ 2019-02-26 08:23 Narh 阅读(221) 评论(0) 推荐(0) 编辑

导航