We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
There is a pattern of 4 consecutive elements in the array A, for example: A[0] -> A[3], and so on. The first number of the sequence = it's index, the 2nd number is 1, the third = index of the fourth and the fourth = 0. And, when you xor all 4 together, you always get 2. When you xor 2 sequences, you get 0, so it doesn't affect the remaining xor. Base on that, you can just find the effective xor, which are from left to the next start sequence index and from right back to the index after the last 8-element sequence.
Xor-sequence
You are viewing a single comment's thread. Return to all comments →
There is a pattern of 4 consecutive elements in the array A, for example: A[0] -> A[3], and so on. The first number of the sequence = it's index, the 2nd number is 1, the third = index of the fourth and the fourth = 0. And, when you xor all 4 together, you always get 2. When you xor 2 sequences, you get 0, so it doesn't affect the remaining xor. Base on that, you can just find the effective xor, which are from left to the next start sequence index and from right back to the index after the last 8-element sequence.