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.
Walk the arrivals in day order and keep each one only if its type still fits the limit inside the trailing window of days.