PROGRAMMING:Activity selection
Suppose a set of N activities s = {$$a_{ 1}$$,$$a_{ 2}$$,....,$$a_{ n} $$}, these activities use the same resource (such as the same ladder classroom), and this resource can only be used by one activity at a time. $a per activity_{ i} $$has a start time of $$s_{ i} $$and an end time $$f_{ i} $$, where $$0 < = s_{ i}=f_{ j} $$or $$s_{ j}>=f_{ i} $$, then $$a_{ i} $$and $$a_{ j} $$is compatible. In the activity selection problem, we want to select a maximum compatible activity set.
###Input format:
The first line is an integer n (n ≤ 1000);
The next n rows, two integers per row, the first $$s_{ i} $$, the second is $$F_{ i}$$($$0<=s_{ i}###Output format:
Output the maximum number of activities that can be scheduled.
###Input example:
```in
eleven
3 5
1 4
12 14
8 12
0 6
8 11
6 10
5 7
3 8
5 9
2 13
```
###Output example:
```out
four
```
###Example explanation:
The four activities are 1, 4, 5, 7, 8, 11 and 12, 14.
answer:If there is no answer, please comment
###Input format:
The first line is an integer n (n ≤ 1000);
The next n rows, two integers per row, the first $$s_{ i} $$, the second is $$F_{ i}$$($$0<=s_{ i}
Output the maximum number of activities that can be scheduled.
###Input example:
```in
eleven
3 5
1 4
12 14
8 12
0 6
8 11
6 10
5 7
3 8
5 9
2 13
```
###Output example:
```out
four
```
###Example explanation:
The four activities are 1, 4, 5, 7, 8, 11 and 12, 14.
answer:If there is no answer, please comment