Processing math: 100%

Problem #376

Infinite XOR

Given a binary array A (consisting of 1's and 0's) of length n\ (=438276543893501974), we define a time-dependent transformation: A[i]^{(t)} = A[i+1]^{(t-1)}\ \oplus\ A[i+2]^{(t-1)} \oplus\ ...\ \oplus\ A[n]^{(t-1)}

where \oplus denotes the bitwise XOR operation. At each time step, the last element of the array becomes 0, A[n]^{(t)} = 0 for all t > 0.

For a configuration of the array A: F(A) = \sum_{t=0}^{\infty} \sum_{i=1}^{n} A[i]^{(t)}

Your task is to compute the sum of F(A) over all 2^n possible configurations of A. Since the answer may be large, report it modulo 998,244,353.

Contributed by Tanay Kapadia

Solved by 5 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.