In a mysterious botanical garden, an unusual phenomenon is occurring. Each plant hosts a colony of zombie ants that produce both poison and antidote. The delicate balance between these substances determines the plants' survival.
Each plant contains a specific number of zombie ants. These ants have a peculiar behavior:
- Each ant produces a fixed amount of poison that stays within its host plant.
- Each ant also produces an antidote, but the antidote immediately transfers to the neighboring plant on the right (if such a plant exists).
- The leftmost plant has a special property—it receives an infinite supply of antidote from an underground spring, ensuring its survival.
Each night, a deadly cycle occurs:
- If a plant's poison level (determined by its number of ants) exceeds the antidote it receives from its left neighbor, the plant dies and is removed from the garden.
- After plant deaths, the antidote flow adjusts to the new arrangement before the next night begins.