Every season at the otter slides of Sleekwater, someone must prove the quality of the harvest. This year the task falls to Gautam, armed only with the stretches register. Task: n crews each guard a half-open interval [s,e). An interval ending at time t does not overlap one starting at t. Print the maximum number overlapping at any instant. Input format: First line: n. Next n lines: s e. Output format: Print the maximum simultaneous overlap. Constraints: 1 <= n <= 1760; 0 <= s < e <= 10^9.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 1760; 0 <= s < e <= 10^9.
