P2949 [USACO09OPEN] Work Scheduling G
Description
Farmer John has so very many jobs to do! In order to run the farm efficiently, he must make money on the jobs he does, each one of which takes just one time unit.
His work day starts at time 0 and has 1,000,000,000 time units (!). He currently can choose from any of N (1
Input Format
\* Line 1: A single integer: N
\* Lines 2..N+1: Line i+1 contains two space-separated integers: D\_i and P\_i
Output Format
\* Line 1: A single number on a line by itself that is the maximum possible profit FJ can earn.
Explanation/Hint
Complete job 3 (1,7) at time 1 and complete job 1 (2,10) at time 2 to maximize the earnings (7 + 10 -> 17).