码迷,mamicode.com
首页 >  
搜索关键字:xor    ( 1450个结果
hdu3949(线性基,求第k小的异或和
题目链接: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
Nowcoder 练习赛26 D xor序列 ( 线性基 )
题目链接 题意 : 中文题、点链接 分析 : 对于给定的 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
打卡2
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(枚举)
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
Spoj 10628. Count on a tree
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
Codeforces Round #340 (Div. 2) E. XOR and Favorite Number 【莫队算法 + 异或和前缀和的巧妙】
任意门: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
Luogu P4462 [CQOI2018]异或序列
一道稍微要点脑子的莫队题,~~原来省选也会搬CF原题~~ 首先利用$xor$的性质,我们可以搞一个 异或前缀和 的东西 每一次插入一个数,考虑它和之前已经加入的数能产生多少贡献,这个我们再开一个数据统计一下 出现次数 。 但是唯一要注意的就是一些细节问题,尤其是左端点加入(or删除)的时候要减一 然 ...
分类:其他好文   时间:2018-08-29 22:19:34    阅读次数:215
[LUOGU 4717] 快速沃尔什变换
"题目传送 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
CodeForces - 983B XOR-pyramid(区间dp,异或)
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
POJ 3764 The xor-longest Path
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
1450条   上一页 1 ... 44 45 46 47 48 ... 145 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!