Fruits Into Baskets III
Each fruit takes the leftmost basket that can hold it; a max segment tree over capacities finds that basket by descent.
Each fruit takes the leftmost basket that can hold it; a max segment tree over capacities finds that basket by descent.