Maximum Total Range Over K Distinct Subarrays

Company: Arcesium

Difficulty: hard