AAAAHH! Overbooked!
Time limit1sMemory limit128 MB
Given N event time ranges in hh:mm-hh:mm format, check whether any two events overlap in time.
Problem
Elaine is so excited for the new school year that she signed up for several events on the same day (sadly, this programming contest is not one of them). She may have overdone it, though — she never checked whether the events she signed up for overlap in time. While you sit here in the contest, why not check for her? Given the events Elaine registered for, decide whether any two of them conflict.
Input
The input consists of multiple test cases. Each test case begins with a single integer () on its own line, the number of events. The next lines each give the start and end time of one event in 24-hour hh:mm-hh:mm format. The end time is always strictly later than the start time. The input ends with a line containing , which must not be processed.
Output
For each test case, print a single line reading conflict (without quotes) if any two of Elaine's events overlap in time, or no conflict (without quotes) otherwise. Assume Elaine can travel across campus instantaneously, so if one event starts exactly when another ends, the two events do not conflict.