#C3213. Meeting Room Allocation
Meeting Room Allocation
Meeting Room Allocation
You are given several test cases. Each test case consists of a list of meeting time intervals. Your task is to determine whether all the meetings can be scheduled in a single room without any overlap.
For each test case, if any two meetings overlap (i.e., a meeting starts before the previous meeting ends), output \(\text{No}\); otherwise, output \(\text{Yes}\). Note that if there are no meetings, the answer is \(\text{Yes}\).
inputFormat
The input is read from stdin and has the following format:
- The first line contains an integer \(T\) which represents the number of test cases.
- For each test case:
- The first line contains an integer \(n\), the number of meetings.
- Each of the next \(n\) lines contains two integers \(x\) and \(y\) (\(x\) for start time and \(y\) for end time), representing a meeting interval.
outputFormat
For each test case, output a single line to stdout containing \(\text{Yes}\) if the meetings can be scheduled in one room without overlapping, or \(\text{No}\) if there is a conflict.
## sample2
3
0 30
5 10
15 20
2
7 10
2 4
No
Yes
</p>