题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=5344 #include<stdio.h> #include<cstring> ; int A[MAXN]; void bas( int n, int m, int z, int l){ ;i < n; ++i){ A[i] = ( (]*m + z )% l; } } void Cal(int n){ ; ;i < n; ++i){ sum = sum ^ (A[i]*);…
Problem Description MZL loves xor very much.Now he gets an array A.The length of A ≤i,j≤n) The xor of an array B is defined as B1 xor B2...xor Bn Input Multiple test cases, the first line contains an integer T(no more than ), indicating the number…
MZL's xor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 911 Accepted Submission(s): 589 Problem Description MZL loves xor very much.Now he gets an array A.The length of A is n.He wants to k…
MZL's xor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 249 Accepted Submission(s): 187 Problem Description MZL loves xor very much.Now he gets an array A.The length of A is n.He wants to k…
题意:给一个序列A,设序列B的中的元素有(Ai+Aj)(1≤i,j≤n),那么求B中所有元素的异或之和.而序列A是这样来的:A1=0,Ai=(Ai−1∗m+z) mod l. 思路:相同的元素异或结果为0,所以可以去掉,也就是剩下A中的元素ai+ai那些而已. 小心乘法会溢出 #include <bits/stdc++.h> #define INF 0x7f7f7f7f #define pii pair<int,int> #define LL long long using nam…
MZL's xor Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/65536K (Java/Other) Total Submission(s) : 1 Accepted Submission(s) : 1 Problem Description MZL loves xor very much.Now he gets an array A.The length of A is n.He wants to know t…
MZL's xor Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 800 Accepted Submission(s): 518 Problem Description MZL loves xor very much.Now he gets an array A.The length of A is n.He wants to…