Cyclic XOR
You are given a cyclic $0$-indexed array $A$ of length $N$. Let us define $f(A)$ as another array produced as follows: - $f(A)_i = A_{i - 1} \oplus A_i \oplus A_{i + 1}$. Note that $A_{-1} = A_{N - 1}$ and $A_N = A_0$ due to cyclic array properties. Also, $\oplus$ represents Bitwise XOR operator. --- You are given $2$ integers $N$ and $K$. Find the number of arrays such that: - $0 \le A_i
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start