← All problemsSign in

Good Arrays (Cyclic)

CodeChefRating 1851Open on judge ↗

**The difference between the $2$ versions is in the definition of goodness, specifically, whether the subarray is allowed to be cyclic or not. Here, you are allowed to choose a cyclic subarray.** An array $A$ of size $N$ (where $N$ is even) is said to be **good** if it is possible to choose a **continuous cyclic subarray** of size $\dfrac{N}{2}$ and then multiply all the elements in the subarray

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start