Maximum Subarray Sum With Length Divisible by K
Subarrays whose length is divisible by k start at prefix indices with the same residue, so keep the lowest prefix per residue.
Subarrays whose length is divisible by k start at prefix indices with the same residue, so keep the lowest prefix per residue.