Status: IN
The closed-form formula is equivalent to greedily picking all 1s, then all 0s, then -1s, which is provably optimal because item values are strictly ordered (1 > 0 > -1).
Source: entries/2026/06/06/k-items-with-the-maximum-sum-solution.md
JSON