#nt902. 莫比乌斯反演
莫比乌斯反演
Mobius Inversion
Problem Description
Given a function and the relation , find .
Input Format
The first line contains four integers $n(1\leq n\leq 10^6), A, B, C(0\leq A, B, C < 2^{32})$.
To avoid overly large input, is generated by the following code:
unsigned int A,B,C;
inline unsigned int rng61() {
A ^= A << 16;
A ^= A >> 5;
A ^= A << 1;
unsigned int t = A;
A = B;
B = C;
C ^= t ^ A;
return C;
}
int main(){
scanf("%d%u%u%u", &n, &A, &B, &C);
for (int i = 1; i <= n; i++)
f[i] = rng61();
}
Output Format
To avoid overly large output, output the XOR sum of all elements of after converting each of them to a 32-bit unsigned integer.
Sample Input
10 1 2 3
Sample Output
4289023889