#C5558. Meeting Conflict Detection

    ID: 49220 Type: Default 1000ms 256MiB

Meeting Conflict Detection

Meeting Conflict Detection

You are given a schedule of meetings. Each meeting has a start time, an end time (formatted as HH:MM in 24-hour notation) and a day of the week.

Your task is to determine if any two meetings on the same day overlap. Two meetings on the same day are considered to overlap if their time intervals intersect. Formally, for two meetings with intervals \([a,b)\) and \([c,d)\), a conflict exists if and only if \(a < d \text{ and } c < b\).

Input is read from stdin and output is printed to stdout.

inputFormat

The first line contains a single integer \(n\) representing the number of meetings. Each of the following \(n\) lines contains three space-separated values: start_time, end_time (in HH:MM format), and day_of_week.

Example:

3
09:00 10:00 Monday
09:30 10:30 Monday
11:00 12:00 Monday

outputFormat

Print True if there is any conflict among the meetings (i.e. if any two meetings on the same day overlap), otherwise print False.

## sample
3
09:00 10:00 Monday
09:30 10:30 Monday
11:00 12:00 Monday
True