4518: P2970 [USACO09DEC] Selfish Grazing S
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:13
Solved:11
Description

Input
* Line 1: A single integer: N
* Lines 2..N+1: Line i+1 contains the two space-separated integers: S_i and E_i
Output
* Line 1: A single integer representing the maximum number of cows that can graze at once.
Sample Input Copy
5
2 4
1 12
4 5
7 10
7 8
Sample Output Copy
3