P1848 [USACO12OPEN] Bookshelf G
Description
When Farmer John isn't milking cows, stacking haybales, lining up his cows, or building fences, he enjoys sitting down with a good book. Over the years, he has collected N books (1
Input Format
Line 1: Two space-separated integers: N and L.
Lines 2..1+N: Line i+1 contains two space-separated integers: H(i) and W(i). (1
Output Format
Line 1: The minimum possible total height for the set of bookshelves.