P2918 [USACO08NOV] Buying Hay S

Description

Farmer John is running out of supplies and needs to purchase H (1

Input Format

\* Line 1: Two space-separated integers: N and H \* Lines 2..N+1: Line i+1 contains two space-separated integers: P\_i and C\_i

Output Format

\* Line 1: A single integer representing the minimum cost FJ needs to pay to obtain at least H pounds of hay.

Explanation/Hint

FJ can buy three packages from the second supplier for a total cost of 9.