IntervalsSorting
Given a list of meetings, each with a start and an end time, decide whether one person could attend all of them. A meeting that ends at time t does not conflict with one that starts at time t.
Input
Line 1: n. Next n lines: the start and end of each meeting.
Output
Print true if no two meetings overlap, otherwise false.
Constraints
1 <= n <= 10^4 0 <= start < end <= 10^6
Example 1
Input
3 0 30 5 10 15 20
Output
false
5-10 happens during 0-30.
Example 2
Input
2 7 10 2 4
Output
true
No overlap.