题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3949 XOR Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...
分类:
其他好文 时间:
2018-09-12 21:12:16
阅读次数:
362
题目链接 题意 : 中文题、点链接 分析 : 对于给定的 X 和 Y 假设存在一个 Z 使得 X (xor) Z = Y 做一个变形 X (xor) Z (xor) Y = 0 X (xor) Y = Z 也就是原集合中 是否存在一个异或组合结果为 X (xor) Y 线性基模板一套、AC #inc ...
分类:
其他好文 时间:
2018-09-10 21:55:11
阅读次数:
224
XOR and Favorite Number 这个题能改变成加法。 第三个while始终觉得区间变长了,看了一下午还是很难理解。 #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 50; typedef lon ...
分类:
其他好文 时间:
2018-09-05 00:52:28
阅读次数:
167
UVA12716 GCD XOR Description Given an integer N, find how many pairs (A, B) are there such that: gcd(A, B) = A xor B where 1 ≤ B ≤ A ≤ N. Here gcd(A, ...
分类:
其他好文 时间:
2018-09-04 20:49:53
阅读次数:
167
Description 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。 Input 第一行两个整数N,M。 第二行有N个整数,其中第i个整数 ...
分类:
其他好文 时间:
2018-09-03 19:35:01
阅读次数:
149
任意门:http://codeforces.com/problemset/problem/617/E E. XOR and Favorite Number time limit per test 4 seconds memory limit per test 256 megabytes input ...
分类:
编程语言 时间:
2018-08-31 01:25:10
阅读次数:
250
一道稍微要点脑子的莫队题,~~原来省选也会搬CF原题~~ 首先利用$xor$的性质,我们可以搞一个 异或前缀和 的东西 每一次插入一个数,考虑它和之前已经加入的数能产生多少贡献,这个我们再开一个数据统计一下 出现次数 。 但是唯一要注意的就是一些细节问题,尤其是左端点加入(or删除)的时候要减一 然 ...
分类:
其他好文 时间:
2018-08-29 22:19:34
阅读次数:
215
"题目传送 Luogu4717" 题意: 给你$A$,$B$,求$$C_i=\sum_{j\oplus k=i}A_j B_k $$ $\oplus$包括$or$,$and$,$xor$ $len\le 2^{17}$ 题解: 裸的$FWT$,总结先留坑 过程: 一切顺利 代码: const int ...
分类:
其他好文 时间:
2018-08-29 21:28:57
阅读次数:
219
XOR-pyramid time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output XOR-pyramid time limit per t ...
分类:
其他好文 时间:
2018-08-28 16:15:01
阅读次数:
182
Description In an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p: ⊕ is the xor operator. We say ...
分类:
其他好文 时间:
2018-08-23 22:17:50
阅读次数:
261