
线性基
csu_xiji
这个作者很懒,什么都没留下…
展开
-
HDU 6579 Operation 区间线性基
http://acm.hdu.edu.cn/showproblem.php?pid=6579There is an integer sequence a of length n and there are two kinds of operations:0 l r: select some numbers from al...ar so that their xor sum is max...原创 2019-08-08 14:31:28 · 149 阅读 · 0 评论 -
洛谷 P3812 【模板】线性基
https://www.luogu.org/problem/P3812题目背景这是一道模板题。题目描述给定n个整数(数字可能重复),求在这些数中选取任意个,使得他们的异或和最大。输入格式第一行一个数n,表示元素个数接下来一行n个数输出格式仅一行,表示答案。输入输出样例输入 #121 1输出 #11说明/提示1≤n≤50,0≤Si...原创 2019-08-07 11:03:45 · 157 阅读 · 0 评论 -
HDU 3949 XOR 异或第k小 线性基模板
http://acm.hdu.edu.cn/showproblem.php?pid=3949XOR is a kind of bit operator, we define that as follow: for two binary base number A and B, let C=A XOR B, then for each bit of C, we can get its value...原创 2019-08-07 11:04:12 · 250 阅读 · 0 评论 -
线性基解析及模板
博客:https://blog.youkuaiyun.com/qaq__qaq/article/details/53812883https://blog.sengxian.com/algorithms/linear-basis模板:例题(查询异或最大值)#include<bits/stdc++.h>#define ll long long#define MAXN 1000...原创 2019-08-07 11:03:27 · 155 阅读 · 0 评论 -
BZOJ 2460 元素 线性基+贪心
https://www.lydsy.com/JudgeOnline/problem.php?id=2460 相传,在远古时期,位于西方大陆的 Magic Land 上,人们已经掌握了用魔法矿石炼制法杖的技术。那时人们就认识到,一个法杖的法力取决于使用的矿石。一般地,矿石越多则法力越强,但物极必反:有时,人们为了获取更强的法力而使用了很多矿石,却在炼制过程中发现魔法矿石全部消失了,从而无...原创 2019-08-07 11:04:34 · 125 阅读 · 0 评论 -
BZOJ 2115 Xor
https://www.lydsy.com/JudgeOnline/problem.php?id=2115DescriptionInput第一行包含两个整数N和 M, 表示该无向图中点的数目与边的数目。 接下来M 行描述 M 条边,每行三个整数Si,Ti ,Di,表示 Si 与Ti之间存在 一条权值为 Di的无向边。 图中可能有重边或自环。Output仅包含一个整数,表示最...转载 2019-08-07 11:04:58 · 137 阅读 · 0 评论 -
UVALive - 8512 XOR 区间线性基
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=6537题目大意:给定a[1...n],Q次询问求A[L...R]的异或组合再或上K的最大值。思路:学长的ppt上讲过怎么维护区间线性基。(不是线段树)详情看代码...原创 2019-08-07 17:11:23 · 383 阅读 · 0 评论 -
BZOJ 2844 albus就是要第一个出场
https://www.lydsy.com/JudgeOnline/problem.php?id=2844已知一个长度为n的正整数序列A(下标从1开始), 令 S = { x | 1 <= x <= n }, S 的幂集2^S定义为S 所有子集构成的集合。定义映射 f : 2^S -> Zf(空集) = 0f(T) = XOR A[t] , 对于一切t属于T现在albus把2...原创 2019-08-07 17:19:36 · 1121 阅读 · 0 评论