#K91712. Meeting Schedule Conflict
Meeting Schedule Conflict
Meeting Schedule Conflict
You are given a schedule of meetings where each meeting is represented by its start and end times. Your task is to determine whether any two meetings overlap (i.e. there is a conflict in the schedule). Two meetings are considered to conflict if, after sorting the meetings by their start time, a meeting begins before the previous one ends.
Mathematically, if meetings are represented as intervals \([s_i, e_i]\), then a conflict exists if there is some \(i \ge 1\) such that \(s_i < e_{i-1}\). Note that if one meeting ends exactly when the next one begins, they do not conflict.
inputFormat
The input is read from standard input and is formatted as follows:
- The first line contains a single integer \(n\), the number of meetings.
- The following \(n\) lines each contain two integers separated by a space, representing the start and end times of a meeting.
For example:
3 1 5 6 10 11 15
outputFormat
Output to standard output a single string: "True" if there is any conflict (i.e. if at least one meeting overlaps with another), or "False" otherwise.
## sample3
1 5
6 10
11 15
False