Given start and end times of activities, select the max number of non-overlapping activities.
Input Format
Integer n n lines: two integers (start end)
Output Format
Integer (max number of activities)
Sample Input
3 1 2 2 3 3 4
Sample Output
3
Given start and end times of activities, select the max number of non-overlapping activities.
Integer n n lines: two integers (start end)
Integer (max number of activities)
3 1 2 2 3 3 4
3