← 返回 microsoft 的题目列表Meeting Rooms (Medium): Minimum number of rooms
类型:online_judge
Problem: Meeting Rooms (Medium)
Given n meeting intervals intervals[i] = [start_i, end_i) (left-closed, right-open), compute the minimum number of conference rooms required so that no meetings in the same room overlap.
Input (stdin)
First line: integer n
Next n lines: start_i end_i
Output
Minimum number of rooms required.
Constraints
1 <= n <= 2e5
0 <= start_i < end_i <= 1e9
Example
Input:
3
0 30
5 10
15 20
Output:
2
Example
Input
3
0 30
5 10
15 20
Output
2