Problem V
Interval Scheduling

Consider a set of
Input
The first line of input consists of an integer
Output
Output a single integer, the largest number of nonoverlapping intervals.
Sample Input 1 | Sample Output 1 |
---|---|
3 1 4 2 8 5 9 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
8 0 6 1 4 3 5 3 8 4 7 5 9 6 10 8 11 |
3 |