随笔分类 - 线性基
摘要:Mahmoud and Ehab and yet another xor task 存在的元素的方案数都是一样的, 啊, 我好菜啊。 离线之后用线性基取check存不存在,然后计算答案。
阅读全文
Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined) G - Xor-matic Number of the Graph 线性基好题
摘要:G - Xor-matic Number of the Graph 上一道题的加强版本,对于每个联通块需要按位算贡献。
阅读全文
摘要:这种路径异或问题,可以转换为一条路径和若干个环的线性组合,然后就能用线性基搞了。 复习了一波线性基。
阅读全文
摘要:1 struct DSU 2 { 3 int fa[MAXN]; 4 vector base[MAXN]; 5 void add(int tar,int x) 6 { 7 for(auto &t:base[tar]) 8 x=min(x,x^t); 9 if(!x)return; 10 ...
阅读全文