max-captured-forts-anchor-greedy

Status: IN

`last_non_zero` is updated on every non-zero element, not just on successful captures, ensuring the closest valid anchor is always used for future candidates.

Source: entries/2026/06/06/maximum-enemy-forts-that-can-be-captured-solution.md

JSON