Problem 3679 · Medium

Minimum Discards to Balance Inventory

Walk the arrivals in day order and keep each one only if its type still fits the limit inside the trailing window of days.

Open the interactive visualisation