Company: Dell
Difficulty: medium
ProblemId: 25679399 Energy Orb Neutralization On the planet Xenon, Captain Zog must neutralize an alien artifact consisting of N energy orbs, each resonating at a unique frequency Hi. The goal is to deactivate all orbs using the fewest possible cycles. Process: Each deactivation cycle targets a contiguous sequence of orbs exhibiting a symmetrical pattern. Symmetry here means the sequence can split into two halves that mirror each other: the first orb matches the last, the second matches the second-last, and so forth. After neutralizing a symmetrical sequence, the remaining orbs rearrange into a new continuous pattern. As Chief Researcher, your task is to determine the minimum number of cycles required to render the artifact safe. This involves strategically identifying and neutralizing symmetrical sequences until all orbs are deactivated, ensuring the artifact is inert and ready for investigation. Input Format The first line contains a single integer N representing the number of energy