4531: P2949 [USACO09OPEN] Work Scheduling G

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Input

Output

Sample Input Copy

3 
2 10 
1 5 
1 7 

Sample Output Copy

17

HINT