407991: GYM102961 E Restaurant Customers
Memory Limit:256 MB
Time Limit:0 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
E. Restaurant Customerstime limit per test2.0 smemory limit per test256 megabytesinputstandard inputoutputstandard output
You are given the arrival and leaving times of $$$n$$$ customers in a restaurant.
What was the maximum number of customers?
InputThe first input line has an integer $$$n$$$: the number of customers.
After this, there are $$$n$$$ lines that describe the customers. Each line has two integers $$$a$$$ and $$$b$$$: the arrival and leaving times of a customer.
You may assume that all arrival and leaving times are distinct.
Constraints:
- $$$1 \le n \le 2 \cdot 10^5$$$
- $$$1 \le a \le b \le 10^9$$$
Print one integer: the maximum number of customers.
ExampleInput3 5 8 2 4 3 9Output
2