#K85882. Course Schedule Conflict Checker

    ID: 36740 Type: Default 1000ms 256MiB

Course Schedule Conflict Checker

Course Schedule Conflict Checker

You are given a schedule of courses for a student. Each course is represented by a course code and its starting and ending time.
The time is provided as four integers: start hour, start minute, end hour, and end minute. Two courses conflict if their time intervals overlap. Note that if one course ends exactly when another begins, there is no conflict.

Your task is to determine whether any of the courses have overlapping times.

inputFormat

The input is given via standard input:

  1. The first line contains a single integer N, representing the number of courses.
  2. The following N lines each contain a course description in the following format:
    CourseCode StartHour StartMinute EndHour EndMinute

For example:

2
MTH101 8 0 9 0
PHY101 9 0 10 0

outputFormat

Output a single line to standard output:

  • Print CONFLICT if any of the courses have overlapping time intervals.
  • Print NO CONFLICT if there is no overlap.
## sample
2
MTH101 8 0 9 0
PHY101 9 0 10 0
NO CONFLICT